|
| 1 | +--- |
| 2 | +title: "Use React and JSX in ASP.NET MVC" |
| 3 | +layout: post |
| 4 | +author: Daniel Lo Nigro |
| 5 | +--- |
| 6 | +*Cross-posted from [the official React blog](http://facebook.github.io/react/blog/2014/04/04/reactnet.html).* |
| 7 | +____ |
| 8 | + |
| 9 | +Today we're happy to announce the initial release of |
| 10 | +[ReactJS.NET](http://reactjs.net/), which makes it easier to use React and JSX |
| 11 | +in .NET applications, focusing specifically on ASP.NET MVC web applications. |
| 12 | +It has several purposes: |
| 13 | + |
| 14 | + - On-the-fly JSX to JavaScript compilation. Simply reference JSX files and they |
| 15 | + will be compiled and cached server-side. |
| 16 | + |
| 17 | + ```html |
| 18 | + <script src="@Url.Content("/Scripts/HelloWorld.jsx")"></script> |
| 19 | + ``` |
| 20 | + - JSX to JavaScript compilation via popular minification/combination libraries |
| 21 | + (Cassette and ASP.NET Bundling and Minification). This is suggested for |
| 22 | + production websites. |
| 23 | + - Server-side component rendering to make your initial render super fast. |
| 24 | + |
| 25 | +Even though we are focusing on ASP.NET MVC, ReactJS.NET can also be used in |
| 26 | +Web Forms applications as well as non-web applications (for example, in build |
| 27 | +scripts). ReactJS.NET currently only works on Microsoft .NET but we are working |
| 28 | +on support for Linux and Mac OS X via Mono as well. |
| 29 | + |
| 30 | +Installation |
| 31 | +------------ |
| 32 | +ReactJS.NET is packaged in NuGet. Simply run `Install-Package React.Mvc4` in the |
| 33 | +package manager console or search NuGet for "React" to install it. |
| 34 | +[See the documentation](http://reactjs.net/docs) for more information. The |
| 35 | +GitHub project contains |
| 36 | +[a sample website](https://github.com/reactjs/React.NET/tree/master/src/React.Sample.Mvc4) |
| 37 | +demonstrating all of the features. |
| 38 | + |
| 39 | +Let us know what you think, and feel free to send through any feedback and |
| 40 | +report bugs [on GitHub](https://github.com/reactjs/React.NET). |
0 commit comments