Wrong autocompletion react
Hi,
I have something like this in one of my files:
import {
...
Button
} from "@shopify/polaris";
When I begin to type button, it detects it and autocompletes it with a void element :
<Button/>
However, to be usable the tag should be in the following form :
<Button>HTML here</Button>
Is there any way to deal with this problem like modifying the autocompletion and get <Button></Button> ?
Please sign in to leave a comment.
There is no way to switch to non-self-closing tag when completing it; if you miss this option, please feel free to vote for https://youtrack.jetbrains.com/issue/WEB-32278.
Note that you can generate a closing tag for your component using Expand empty tag intention available on Alt+Enter.
You can also try using Emmet for tag creation: type
MyComponentand hit Tab - it will expand to
<MyComponent></MyComponent>