I cannot get JSX support in WebStorm. That is, it does not recognise JSX in react component render methods. It just looks like this to me :
Apparently it is possible, and there is some documentation on the web :
https://blog.jetbrains.com/webstorm/2015/10/working-with-reactjs-in-webstorm-coding-assistance/
It states that you should use JSX Harmony which can be found in Preferences | Languages & Frameworks | JavaScript.
But in my version of WebStorm (i.e. the latest 2016.3) there is no such checkbox for JSX Harmony. There is something called JSX Emmet which is already checked by default... but does not help.
I just realised that there is a Javascript language version drop down which you have to change to React JSX. It wasn't clear to me in the documentation, or the 'search' field in the Settings window.
Basically you have to do the following :
And you are done :)
I was able to create .jsx
files, but in the next session WebStorm didn't recognize it anymore. Override File Type
did solve the issue for me.
Another option is to create a file without an extension and use the automatic dialog to associate the type:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With