Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add React.PureComponent #7195

Merged
merged 1 commit into from
Jul 6, 2016
Merged

Add React.PureComponent #7195

merged 1 commit into from
Jul 6, 2016

Commits on Jul 6, 2016

  1. Add React.PureComponent

    This provides an easy way to indicate that components should only rerender when given new props, like PureRenderMixin. If you rely on mutation in your React components, you can continue to use `React.Component`.
    
    Inheriting from `React.PureComponent` indicates to React that your component doesn't need to rerender when the props are unchanged. We'll compare the old and new props before each render and short-circuit if they're unchanged. It's like an automatic shouldComponentUpdate.
    sophiebits committed Jul 6, 2016
    Configuration menu
    Copy the full SHA
    aab1fd6 View commit details
    Browse the repository at this point in the history