No intellisense for React in Visual Studio 2015

I do not see intellisense for ReactJS, for example, such as React.createClass , although I see the _references.js file in the root folder. The _references.js file has a reference link to various js response files.

My reaction file extension is JS, not JSX.

+5
source share
1 answer

I fixed this problem by importing the NuGet package "react.js" and finishing the script locally.

I also added _references.js to ~ / Scripts / in my project. Visual Studio had an assistant called "add ..." called " _references.js intellisense file ", which looked like this:

 /// <autosync enabled="true" /> /// <reference path="bootstrap.js" /> /// <reference path="jquery-2.1.4.js" /> /// <reference path="react/jsxtransformer-0.13.1.js" /> /// <reference path="react/react-0.13.1.js" /> /// <reference path="react/react-with-addons-0.13.1.js" /> 

After that, I was able to use intellisense in my jsx files. The _references.js file does not seem to work like CDN on Facebook.

+10
source