O'Reilly logo

React Quickly: Painless web apps with React, JSX, Redux, and GraphQL by Azat Mardan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

React Cheatsheet

INSTALLATION
React <script src="https://unpkg.com/react@15/dist/react.js"></script>$ $ npm install react --save$ $ bower install react --save

React DOM

<script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>$ npm install react-dom$ bower install react-dom --save
RENDERING
ES5 ReactDOM.render( React.createElement( Link, {href: 'https://Node.University'} ) ), document.getElementById('menu'))

ES5+JSX

ReactDOM.render( <Link href='https://Node.University'/>, document.getElementById('menu'))

Server-side rendering

const ReactDOMServer = require('react-dom/server')ReactDOMServer.renderToString(Link, {href: 'https://Node.University'})ReactDOMServer.renderToStaticMarkup(Link, {href:'https://Node.University'}) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required