Answered by:
How to get JSX/React Intellisense in Visual Studio 2015

Question
-
Hi! Sorry if this has been asked before. I'm trying to set VS2015 up for development with ASP MVC and React.js. I got syntax highlighting to work in my .jsx files, but no intellisense, and the auto-formatting is not 100%.
Does anyone have advice on ways to ease React.js development in VS2015? In particular, intellisense and formatting in jsx files?
Thursday, September 17, 2015 1:40 AM
Answers
-
This seemed to work: http://stackoverflow.com/questions/32094173/no-intellisense-for-react-in-visual-studio-2015
Create a file called "_references.js" in your Scripts directory. Install the react.js NuGet package, which adds react javascript files to your project. Add the following to the _references.js file:
/// <autosync enabled="true" />
/// <reference path="bootstrap.js" />
/// <reference path="jquery-1.10.2.js" />
/// <reference path="modernizr-2.6.2.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" />
- Edited by concubicycle Thursday, September 17, 2015 3:58 AM
- Proposed as answer by Jack Zhai-MSFTMicrosoft contingent staff Friday, September 18, 2015 6:49 AM
- Marked as answer by Jack Zhai-MSFTMicrosoft contingent staff Monday, September 28, 2015 4:20 PM
Thursday, September 17, 2015 3:56 AM
All replies
-
This seemed to work: http://stackoverflow.com/questions/32094173/no-intellisense-for-react-in-visual-studio-2015
Create a file called "_references.js" in your Scripts directory. Install the react.js NuGet package, which adds react javascript files to your project. Add the following to the _references.js file:
/// <autosync enabled="true" />
/// <reference path="bootstrap.js" />
/// <reference path="jquery-1.10.2.js" />
/// <reference path="modernizr-2.6.2.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" />
- Edited by concubicycle Thursday, September 17, 2015 3:58 AM
- Proposed as answer by Jack Zhai-MSFTMicrosoft contingent staff Friday, September 18, 2015 6:49 AM
- Marked as answer by Jack Zhai-MSFTMicrosoft contingent staff Monday, September 28, 2015 4:20 PM
Thursday, September 17, 2015 3:56 AM -
Hi concubicycle,
Glad to know that you have resolved this issue, thanks for sharing your solution here.
Have a nice day,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Friday, September 18, 2015 6:49 AM -
I don't know if this will work anymore since jsxtransformer is dropped in react 0.14
Wasn't intellisense meant to be added by default to Visual Studio 2015 now? it still won't work for me.
Friday, October 30, 2015 5:19 AM -
Yeah..it does work. you need to edit->intellisense ->Refresh remote reference.Tuesday, March 14, 2017 11:54 PM