Skip to content

.NET library for JSX compilation and server-side rendering of React components

License

Notifications You must be signed in to change notification settings

Nordstrom/React.NET

 
 

Repository files navigation

ReactJS.NET is a library that makes it easier to use Facebook's React and JSX from C#.

Build status  Code coverage  NuGet downloads  NuGet version

Features

Quick Start

Install the package

Install-Package React.Web.Mvc4

Create JSX files

// /Scripts/HelloWorld.jsx
var HelloWorld = React.createClass({
    render: function () {
        return (
            <div>Hello {this.props.name}</div>
        );
    }
});

Reference the JSX files from your HTML

<script src="@Url.Content("~/Scripts/HelloWorld.jsx")"></script>

Now you can use the HelloWorld component.

For information on more advanced topics (including precompilation and server-side rendering), check out the documentation

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 for more information on contributing to ReactJS.NET.

About

.NET library for JSX compilation and server-side rendering of React components

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 53.3%
  • C# 42.5%
  • CSS 2.6%
  • HTML 0.8%
  • Ruby 0.2%
  • PowerShell 0.2%
  • Other 0.4%