Project

react-jsx

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby React JSX Compiler
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.7.0
>= 10.1.0
>= 2.14.1

Runtime

>= 2.0.2
>= 1.8.0
>= 0.4.1
 Project Readme

Gem Version Build Status Code Climate Coverage Status Dependency Status


Ruby React JSX Compiler

Ruby React JSX Compiler is a bridge to the official React JSX compiler

(Please, refer to http://facebook.github.io/react/docs/getting-started.html for more details)

Installation

Run the command below to install the gem:

gem install react-jsx

or add the line below to your Gemfile:

gem 'react-jsx', require: 'react/jsx'

Usage

require 'react/jsx'

# Some JSX code
jsx = <<-EOF
  /** @jsx React.DOM */
  React.renderComponent(
    <h1>Hello, world!</h1>,
    document.getElementById('example')
  );
EOF

js = React::JSX.compile(jsx)

React sources

This library depends on the react-source gem which is updated any time a new version of React is released.

(Please, refer to https://github.com/facebook/react for more details)

License

Copyright © 2013 Alexey Demin, MIT License