Unexpected token @ (mobx, react-native, flow)
See original GitHub issuePrettier doesn’t work on this fragment of code:
import {observable} from 'mobx';
export default class KeyStore {
@observable keys = [];
}
Unexpected token @ (keyStore.js:4:3)
2 |
3 | export default class KeyStore {
> 4 | @observable keys = [];
| ^
5 | }
ESlint integration enabled. Installed plugins: Flow for Visual Studio Code, React Native VSCode Extension Pack, VS Code ESLint extension.
Probably flow parser issue.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
mobx + react unexpected token - Stack Overflow
I installed mobx and mobx-react ,but is still shows the error of unexpected token before @ symb. Do I need to add something...
Read more >Enabling decorators · MobX
Enable the compiler option "experimentalDecorators": true and "useDefineForClassFields": true in your tsconfig.json . Babel 7. Install support for decorators ...
Read more >mobxjs/mobx - Gitter
Hi all. For information, i have a build error during first integration of Mobx 4 (Unexpected token (3987:69) in .../node_modules/mobx/lib/mobx.module.js), ...
Read more >Flow is giving me errors for React Native type definitions/code ...
Coding example for the question Flow is giving me errors for React Native type ... React Native starter project bundling fails with Unexpected...
Read more >Exploring MobX-State-Tree References - React Native Live
Happy Friday! Let's do some more work on this MobX -State-Tree reference extension.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

see prettier/prettier#4126
It is fine with babylon parser
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.