GithubHelp home page GithubHelp logo

runt18 / 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 6.47 MB

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

Home Page: http://reactjs.net/

License: Other

Batchfile 0.08% CSS 4.79% HTML 1.55% Ruby 0.39% Nginx 0.25% C# 87.70% JavaScript 4.61% PowerShell 0.38% ASP 0.06% Pascal 0.19%

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

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 MVC Core 1.0

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.

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

alxandr avatar andersea avatar arbrown avatar avens19 avatar bartadv avatar berik avatar cdeutsch avatar damiangreen avatar daniel15 avatar davekp avatar dotnetchris avatar dustinsoftware avatar jlchmura avatar jovnas avatar jridgecsi avatar kraigwalker avatar lazytype avatar mandrek44 avatar martinhaluza avatar radnor avatar rickbeerendonk avatar rosdi avatar samppis avatar shikigami avatar soondead avatar st1pps avatar torbenrahbekkoch avatar xabikos avatar yamachu avatar zpao 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.