When designing interfaces, break down the common design elements (buttons, form fields, layout components, etc.) into reusable components with well-defined interfaces. That
ReactTestUtils makes it easy to test React components in the testing framework of your choice (we use
React is usually quite fast out of the box. However, in situations where you need to squeeze every ounce of performance out of your app, it provides a shouldComponentUpdate
shallowCompare is a helper function to achieve the same functionality as PureRenderMixin while using ES6 classes with React. If
One of the first questions people ask when considering React for a project is whether their application will be as fast and responsive as an equivalent non-React version. The
It's a common pattern in React to wrap a component in an abstraction. The outer component exposes a simple property to do something that might have more complex implementation
If you know all the properties that you want to place on a component ahead of time, it is easy to use JSX:
Note: cloneWithProps is deprecated. Use React.cloneElement instead. In rare situations, you may want
React provides powerful abstractions that free you from touching the DOM directly in most cases, but sometimes you simply need to access the underlying API, perhaps to work
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.
Page 2 of 3