https://github.com/reactjs/react.net
.NET library for JSX compilation and server-side rendering of React components
https://github.com/reactjs/react.net
Last synced: 8 months ago
JSON representation
.NET library for JSX compilation and server-side rendering of React components
- Host: GitHub
- URL: https://github.com/reactjs/react.net
- Owner: reactjs
- License: mit
- Created: 2014-03-16T23:18:34.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T15:14:36.000Z (over 2 years ago)
- Last Synced: 2025-04-26T10:56:47.746Z (8 months ago)
- Language: C#
- Homepage: https://reactjs.net/
- Size: 15.4 MB
- Stars: 2,318
- Watchers: 122
- Forks: 926
- Open Issues: 106
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [ReactJS.NET](http://reactjs.net/)
ReactJS.NET is a library that makes it easier to use [Babel](http://babeljs.io/) along with Facebook's [React](https://reactjs.org/) and [JSX](https://reactjs.org/docs/jsx-in-depth.html) from C#.

[](https://www.nuget.org/packages/React.Core/)
[](https://www.nuget.org/packages/React.Core/)
# Features
- On-the-fly [JSX to JavaScript compilation](http://reactjs.net/getting-started/usage.html) via [Babel](http://babeljs.io/)
* JSX to JavaScript compilation via popular minification/combination
libraries:
- [ASP.NET Bundling and Minification](http://reactjs.net/bundling/weboptimizer.html)
- [Cassette](http://reactjs.net/bundling/cassette.html)
- [Webpack](http://reactjs.net/bundling/webpack.html)
- [MSBuild](http://reactjs.net/bundling/msbuild.html)
* [Server-side component rendering](http://reactjs.net/features/server-side-rendering.html)
to make your initial render super-fast, including support for:
- [CSS-in-JS libraries](https://reactjs.net/features/css-in-js.html)
- [React Router](https://reactjs.net/features/react-router.html)
- [React Helmet](https://reactjs.net/features/react-helmet.html)
- Custom JS logic via implementing [IRenderFunctions](https://github.com/reactjs/React.NET/blob/c93921f059bfe9419ad7094c184979da422a4477/src/React.Core/IRenderFunctions.cs) and passing to [Html.React](https://github.com/reactjs/React.NET/blob/c93921f059bfe9419ad7094c184979da422a4477/src/React.AspNet/HtmlHelperExtensions.cs#L71)
* [Runs on Windows, OS X and Linux](http://reactjs.net/getting-started/chakracore.html) via .NET Core and ChakraCore
* Supports both ASP.NET 4.0/4.5 and ASP.NET Core
# Quick Start
```
dotnet new -i React.Template
dotnet new reactnet-vanilla
dotnet run
```
#### Planning on using `require` or `import` module syntax in your application? Use the `reactnet-webpack` template instead for webpack support.
See also:
- [Getting Started](https://reactjs.net/getting-started/aspnetcore.html)
- [Tutorial](https://reactjs.net/tutorials/aspnetcore.html)
## Building Manually and Contributing
When building your own copy of ReactJS.NET (for example, if implementing a new
feature or fixing a bug), your first build always needs to be done using the
build script (`dev-build.bat`) as this generates a few files required by the
build (such as `SharedAssemblyVersionInfo.cs`). Once this build is completed,
you can open `React.sln` in Visual Studio and compile directly from Visual
Studio. Please refer to the [documentation page on
contributing](http://reactjs.net/dev/contributing.html) for more information on
contributing to ReactJS.NET.
Note that the build requires you to have Git installed. If you do not want to
install Git, you may remove the `GitVersion` task from `build.proj`.