-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
would using shouldComponentUpdate instead of componentWillReceiveProps give performance increases? #58
Comments
You're onto something, but using |
I've decided that I don't want to implement this.
|
the way i ended up making my animated component is simply with a |
for reference:
|
For example, if transitions were triggered from
shouldComponentUpdate
, but it returnedfalse
, preventing any re-renderings of children, and only triggering transitions, wouldn't that increase performance greatly over usingcomponentWillReceiveProps
along with various internal states?I know the way the component currently works relies on using its own state--so another way to ask this is: does using
componentWillReceiveProps
result in re-rendering of children (or additional tree parsing) even if the props passed to the children don't change? Or is React smart enough to stop not just virtual dom rendering but also parsing your react components who didn't receive any different props from parents?It seems
shouldComponentUpdate
wouldn't exist if React wouldn't otherwise attempt to parse children (at least in some cases). And if that's the case, animation performance in the current implementation suffers from not making use ofshouldComponentUpdate
to stop propagation of updates that were solely intended to declaratively trigger animations of theAnimatable
parent component.The text was updated successfully, but these errors were encountered: