chenglou / react-tween-state

React animation.
Other
1.74k stars 70 forks source link

Presentation layer might not work well with shouldComponentUpdate #10

Closed chenglou closed 9 years ago

chenglou commented 10 years ago

We basically hide a new state for the transitioning values so manual comparisons in shouldComponentUpdate (without considering the hidden state) would return the bad result during transition (aka not updating when we need to update). Wouldn't be a problem with a deepCompare(state1, state2) function, except js doesn't have it by default so people don't do that.

chenglou commented 9 years ago

Closing. As long as we stick with mixins, this will be the case. ClojureScript folks have it easy since they can just compare the whole prevState and this.state using the efficient deep compare.