How To Configure Visual Studio 2015 To Write JSX In ASP.NET 5 (RC) With Intellisense
I want to write ReactJS code in TypeScript with the environment ASP.NET 5(RC)，but I am not getting intellisense in Visual Studio 2015.
I run "tsd install react-global -save " successfully, but I still don't get intellisense.
I haven't used this, but this looks like what you're looking for: Announcing TypeScript 1.6 Beta: React/JSX, better error checking, and more
There's a file for VS2015 to download and install on that page. Quotes from the article:
React heavily leverages JSX in everyday code. Unfortunately, the syntax for JSX conflicted with the cast syntax that TypeScript already used.
In 1.6, we’ve introduced a new .tsx file extension. This extension does two things: it enables JSX inside of TypeScript files, and it makes the new ‘as’ operator the default way to cast. With this, we’ve added full support for working with React/JSX in TypeScript in a type-safe way.
So, if I'm reading the above correctly you need to install that file and then use the extension .tsx for your files and then Visual Studio should work as desired.
- → Import statement and Babel
- → should I choose reactjs+f7 or f7+vue.js?
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → .tsx webpack compile fails: Unexpected token <
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → React Native with visual studio 2015 IDE
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Alt @decorators in React-Native
- → How to dynamically add class to parent div of focused input field?