vscode-react-javascript-snippets icon indicating copy to clipboard operation
vscode-react-javascript-snippets copied to clipboard

Change the json to delete the react import that is not longer necessary

Open luislealdev opened this issue 2 years ago • 1 comments
trafficstars

Hey! I love the extension but I noticed that it is not up to date, with the new versions of react, JSX can be used without importing it. So it generates unnecessary lines of code, I hope to contribute ;)

There is more information in https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

If there is something that you think should stay the same, tell me and I can return it to its original. Regards and Thank you

luislealdev avatar Jan 03 '23 00:01 luislealdev

so this shouldn't be necessary. If people are using React 16, they still need the import statement, therefore it shouldn't be removed. There's an option to turn off the import React from 'react, however this option is not currently working I don't think, (hence I raised this ticket): https://github.com/ults-io/vscode-react-javascript-snippets/issues/288

tmerlet avatar Feb 22 '23 11:02 tmerlet