GithubHelp home page GithubHelp logo

hhy5277 / react.net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reactjs/react.net

0.0 2.0 0.0 10.64 MB

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

Home Page: http://reactjs.net/

License: MIT License

Batchfile 0.13% Shell 0.01% Ruby 0.71% CSS 4.17% HTML 2.26% C# 88.00% JavaScript 4.19% PowerShell 0.33% ASP 0.04% Pascal 0.16%

react.net's Introduction

ReactJS.NET

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

Build status  NuGet version Download count

Features

Quick Start

Install the package

Install-Package React.Web.Mvc4 # For ASP.NET MVC 4 or 5
Install-Package React.AspNet   # For ASP.NET Core MVC

Create JSX files

// /Scripts/HelloWorld.jsx
class HelloWorld extends React.Component {
	render() {
		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.

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.

react.net's People

Contributors

alexinea avatar alxandr avatar andersea avatar arbrown avatar ariefabubakar avatar avens19 avatar awayken avatar bartadv avatar berik avatar chadburggraf avatar chriscamplejohn avatar coka avatar daniel15 avatar daniilsokolyuk avatar dotnetchris avatar dustinsoftware avatar gunnim avatar halstatt avatar mandrek44 avatar radnor avatar renovate-bot avatar renovate[bot] avatar rickbeerendonk avatar rosdi avatar samppis avatar saranshkataria avatar shikigami avatar taritsyn avatar teimaj avatar xabikos avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.