skip to Main Content

Vscode suggest auto-import for component as Parent enter image description here

but this doesnt work if i try to use auto-import inside html/Component tags

enter image description here

Are there solutions?

2

Answers


  1. Chosen as BEST ANSWER

    As one of the developers on github explained to me, any text inside jsx is just a text, if you wanna have auto import component u need to write inside tag ('<ComponentName.....') or in jsx expression, so auto import will work fine


  2. A similar question was answered here, what goes inside the return statement in React is JSX, not HTML, and the emmet abbreviation for JSX is disabled by default. To make it work as if you are working with normal HTML, you need to edit the settings. You can follow the steps in this and it should work fine. Let me know if you still weren’t able to configure it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search