r5n-dev / vscode-react-javascript-snippets

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

import React from 'react' #288

Open tmerlet opened 1 year ago

tmerlet commented 1 year ago

Hey,

Thanks for this awsome extension.

Is anybody else having problems with the import react setting?

in my vscode settings I have

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

Prettier option works, but react is always being imported at the top of the file.

react - 18.2.0 vscode - 1.75.1

hubcio2115 commented 1 year ago

I did have the same problem. After reading this issue I was playing with the settings and turning it on, then turning prettier setting off then turning import react off fixed it for me.

Also after reanabling prettier it still works.

This solution also has been mentioned in this thread

hymced commented 7 months ago

I did have the same problem. After reading this issue I was playing with the settings and turning it on, then turning prettier setting off then turning import react off fixed it for me.

Also after reanabling prettier it still works.

This solution also has been mentioned in this thread

This did not work for me, the only thing that worked is mentioned here.