So far, we've looked at how to write a single component to display data and handle user input. Next let's examine one of React's finest features: composability.
If you know all the properties that you want to place on a component ahead of time, it is easy to use JSX:
In JSX, <MyComponent /> alone is valid while <MyComponent> isn't. All tags must be closed, either with the self-closing format or with
React React is the entry point to the React library. If you're using one of the prebuilt packages it's available
React.createElement ReactElement createElement( string/ReactClass type, [object props]
getInitialState object getInitialState() Invoked
setProps void setProps( object nextProps, [function callback] )
SyntheticEvent Your event handlers will be passed instances of SyntheticEvent, a cross-browser wrapper
React provides a ReactTransitionGroup add-on component as a low-level API for animation, and a ReactCSSTransitionGroup for easily implementing basic
When specifying a pixel value for your inline style prop, React automatically appends the string "px" for you after your number value, so this works:
Page 9 of 10