0

As the title states: Visual Studio Code React Native IntelliSense is not working. I have installed all the possible extensions for React Native and followed many suggested steps to fix the issue, but none of them helped. I have uninstalled and reinstalled the VSCode with a fresh download.

Installed extensions:

EDIT: Steps I have already tried: --npm install typings -g and then typings install dt~react-native (I had to delete --global,because it threw an error saying to drop it) --changing the jsconfig.json and tsconfig.json --installed this: https://gist.github.com/ZainaliSyed/36ebbf538aa4c96f3a14f15f893199a7

In VSCode at the bottom the language is set to JavaScript. Also Intellisense didn't work for typescript as well.

Bojke
  • 101
  • 1
  • 4

3 Answers3

0

I have solved it. I have completely uninstalled VSCode following this: https://superuser.com/a/1380253/1054629

Bojke
  • 101
  • 1
  • 4
0

Simply install npm i -D @types/react-native & it give auto suggestions to you about react native

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 30 '23 at 14:17
0

The way I just solve this was check the tsconfig.json that you have. Make sure if you have any "paths" or any exports types/interface in any types don't conflict with any HTMLElement types.

If you don't have one, init it inside the root:

npx tsc --init

and make sure to add this under compilerOptions:

{ "jsx":"react-native" }
Destroy666
  • 5,299
  • 7
  • 16
  • 35