Files
react.dev/content/home/examples/a-simple-component.md
Brian Vaughn f5aaf4c1b4 Moved home page example code to /content/home
Now examples are trasnformed to GraphQL during build and assembled by the index template. This makes them easier to edit and tie in with their associated markdown description.
2017-11-06 13:01:13 +00:00

825 B

title, order
title order
A Simple Component 0

React components implement a render() method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by render() via this.props.

JSX is optional and not required to use React. Try the Babel REPL to see the raw JavaScript code produced by the JSX compilation step.