Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

JSX in Tonic

node v0.12.18
version: 1.0.0
endpointsharetweet
Tonic supports JSX right out of the box. Make sure to include React and you're all set to go:
var React = require("react"); var myGreatReactElement = <div>Hello World!</div>; React.renderToString(myGreatReactElement);
You'll notice that we used renderToString instead of render. That's because Tonic is a node environment. Tonic is a great way to test server rendering for React. To learn more about React, check out https://facebook.github.io/react/docs/getting-started.html
Loading…

no comments

    sign in to comment