Webstorm not autocompleting imported react functional components or CSS classnames

For example if I import a react component like so 

import MenuItem from "./MenuItem";

In the return, I would expect to type "M" see the suggestion for "MenuItem" and press tab to have this autocompleted.

<MenuItem></MenuItem>

Instead I have to manually type out the variable exactly as written. 

Similarly, in my Index.cs file, Webstorm does not suggest IDs just by typing "#" or Classes by typing "."

0
1 comment

In JSX context, there are 2 limitations as compared to pure HTML here (even in JSX context):

- tags completion doesn't appear unless you enter the opening < (this was the case for HTML as well until 2021.3)

- a closing tag is not auto-added when choosing tag from completion, the IDE expects that you will start entering attributes and thus only closes the tag on entering / or >

If you feel that this has to be changed to work in the same way as in HTML, please feel free to file feature requests to youtrack, https://youtrack.jetbrains.com/issues/WEB

 

Similarly, in my Index.cs file, Webstorm does not suggest IDs just by typing "#" or Classes by typing "."

 

Did you try hitting Ctrl+Space after entering .?

0

Please sign in to leave a comment.