React Base Fiddle (JSX)

Starting point for creating JSFiddles with React. This uses React with Addons.

by nsshrinivasan

HTML

<div id="container">
    <!-- This element's contents will be replaced with your component. -->
</div>

Babel + JSX

function convertUnicode(input) {
      return input.replace(/\\u([0-9a-fA-F]{4})/g,function(a,b) {
        var charcode = parseInt(b,16);
        return String.fromCharCode(charcode);
      });
    }

    var Hello = React.createClass({
      getInitialState: function() {
        return {
          name: convertUnicode(this.props.name)
        };
      },
      render: function() {
        return <div>Hello {this.state.name}</div>;
      }
    });

    React.render(
      <Hello name="Informaci\ue1f8" />,
      document.getElementById('container')
    );