-
Notifications
You must be signed in to change notification settings - Fork 66
Themr breaks shouldComponentUpdate shallow equal optimization #26
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
Conversation
Add fix. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To recall #25 I should note that I don't see any reasons of including these changes because IMO it's not responsibility of themr
to handle pure
-rendering out of the box.
: this.getThemeNotComposed(props) | ||
} | ||
|
||
componentWillReceiveProps(nextProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you handle context here? Seems like component won't react on changing its theme in context. Even without pure-rendering optimization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After breif dicussion with @istarkov it seems that ThemeProvider
should have some kind of notification mechanism to notify themed components about context changes. This is out of scope of this PR.
Here's a quickfix |
Add failing test showing #25