r5n-dev / vscode-react-javascript-snippets

Extension for React/Javascript snippets with search supporting ES7+ and babel features
MIT License
1.71k stars 440 forks source link

add useState import to useStateSnippet #277

Open totti-rdz opened 1 year ago

totti-rdz commented 1 year ago

I'm kinda confused as I'm pretty sure, that I've used this vs code extension on my old macbook that died in june. But on my old machine the shortcut for the useState snippet was "useState" instead of "useStateSnippet", which lead to confusions, so "useStateSnippet" is the better shortcut.

Anyway the old snippet always updated the React import if useState hasn't been imported yet in the file. And I desperately would love to have that functionality again. Is there any setting I need to enable?

I already have that "importReactOnTop" setting enabled, but that doesn't seem to do the trick here.