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

Components are not pure #47

Closed
cerisier opened this issue Mar 11, 2016 · 1 comment
Closed

Components are not pure #47

cerisier opened this issue Mar 11, 2016 · 1 comment

Comments

@cerisier
Copy link

First, Thanks for the awesome work.

Even tho the components you've written are all stateless components, they are still not treated as pure by React; which means that React will re-render them all even tho their props did not change.

See facebook/react#5677

I understand that Layout components like Container, Box should not behave this way otherwise child components would not be rendered at all. but leaf components such as Button etc would benefit from it ?

On way we could get around this here would be to implement the shouldComponentUpdate method and do a shallowCompare of the props.

@cerisier
Copy link
Author

Closing this actually as benefits would be hardly visible after a second thought...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant