Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
186
rated 0 times [  189] [ 3]  / answers: 1 / hits: 66768  / 8 Years ago, fri, march 11, 2016, 12:00:00

I'm sure I'm missing something simple, but I simply can't get React.js IntelliSense to work in Visual Studio code.


I have done the following:



  • npm install typings

  • ext install Typings Installer in Visual Studio Code

  • ext install Typings in Visual Studio Code

  • typings init in the root directory of my "app"

  • typings install --ambient react-global in the root of my "app"

  • restarted Visual Studio Code


That's created a typings folder. My app is structured in the following folder structure:


├───public
│ ├───css
│ └───scripts
| └───test.js
└───typings
├───browser
│ └───ambient
│ └───react-global
└───main
└───ambient
└───react-global

Yet when I'm in test.js and type React. I get no IntelliSense.


I presume I'm missing something fundamental?


EDIT: Thanks for your help, it's actually more involved again. I think I have it working and wrote about my steps here https://mattdufeu.co.uk/blog/setup-intellisense-vscode-react-js/


More From » reactjs

 Answers
23

You need to add jsconfig.json to the root of your workspace


https://code.visualstudio.com/docs/languages/javascript#_javascript-projects-jsconfigjson


[Note: you can even leave the jsconfig.json file empty]


[#62968] Wednesday, March 9, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leiaf

Total Points: 10
Total Questions: 101
Total Answers: 84

Location: Guam
Member since Tue, Nov 29, 2022
2 Years ago
;