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

`importReactOnTop` setting does not work. #241

Closed MarkLyck closed 2 years ago

MarkLyck commented 2 years ago

After upgrading to the latest version that removed the _ shortcuts in favor of "importReactOnTop" I can no longer get the extension to stop importing React at the top.

I have tried with the setting both on and off (For both user and workspace) and the plugin behaves the same.

Screen Shot 2022-02-11 at 14 43 24

Screen Shot 2022-02-11 at 14 43 44

Screen Shot 2022-02-11 at 14 43 51

Whether the setting is "on" or "off" it always imports React at the top and I have to go manually delete it afterwards.

I am using React 17.0.2 and "prettier": "2.5.1",

setting as JSON:

  "reactSnippets.settings.semiColons": false,
  "reactSnippets.settings.prettierEnabled": true,
  "reactSnippets.settings.importReactOnTop": false

I have tried to completely quite visual studio code and start it back up after changing the settings as well.

bernardogarza commented 2 years ago

I'm having the same problem, I think it is for all the settings because the Typescript Props state prefix doesn't work either, it adds a type instead of interface which is the one I have selected.

chillios-dev commented 2 years ago

Should be fixed in v4.4.0.