Can I enable autocompletion for HTML tags in jsx code?


#1

I am writing react.js code but there is no option for JSX (it automatically recognizes as javascript). Therefore, I do not have code completion like closing the tags. How can I specify JSX type in my file?


#2

I need someone to help me! Is there any better idea to write react code in JSX?


#3

Hi @wuyuanyi135,

just in case you’re still looking for an answer: ctrl + option/alt + e invokes emmet’s “expand abbreviation” command. In case of doubt, check out the keybindings in your preferences.

Hope it is what you’re looking for.

Cheers.


#4

Hi!
There’s the className issue though…
When expanding the abbreviation div.container should return <div className="container"></div> instead of <div class="container"></div> when writing JSX… Any idea on how to get it right? Thank you.