Autosuggest react

React uses XML so the syntax requires closing tag />. However when I press enter after clicking on it, I get standard HTML <img> tag. This is my setting:

 

 

I added @types/react and @types/react-dom but didn't change things. I also don't know what I am supposed to set in type or what it does.

0

Please could you elaborate on your steps? In JSX context, typing <im and then choosing img from completion results in <img/> 

0

https://we.tl/t-paW46IOF9P

Strangely enough <> does give </> but img gives HTML img and not XML img

0

Please try entering img/ and not  img, or type <im and then choose img from completion to crearte a self-closing tag

0

请先登录再写评论。