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

Fix shouldUpdateReactComponent not considering props.key #711

Closed
wants to merge 1 commit into from
Closed

Fix shouldUpdateReactComponent not considering props.key #711

wants to merge 1 commit into from

Conversation

syranide
Copy link
Contributor

Apparently @spicyj already has a pending PR for this that should be considered instead, #591.


key is currently only obeyed by descendants of the root-node, the root-node itself does not obey key. This simple fix ensures that it works on the root-node as well.

I would consider this a bug and speaking hastily to petehunt, he seemed to agree:

<@petehunt> yeah i think that would be a bug

My personal motivation for this is my <swf>-component that I will be releasing, it requires this to support changing src at run-time (although other workarounds do exist). In my opinion, there's no reason why the root-node should be any different from the other children in this regard.

@vjeux
Copy link
Contributor

vjeux commented Dec 25, 2013

I think that makes sense. cc @yungsters

@sophiebits
Copy link
Contributor

See #591.

@syranide
Copy link
Contributor Author

@spicyj Ah, look at that. Yeah, your PR looks perfect, just need to light someones ass on fire then. :)

So this PR should be closed.

@petehunt
Copy link
Contributor

Let's go with @spicyj's PR. Sorry, but thanks for lighting the fire!

@petehunt petehunt closed this Dec 26, 2013
@syranide
Copy link
Contributor Author

@petehunt No need to be "sorry", it's the right decision. :)

@syranide syranide deleted the rootkey branch December 27, 2013 13:31
josephsavona added a commit that referenced this pull request May 15, 2024
Redo of #711 

Note that one test (switch.js) is failing, i'm working on a fix.
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

Successfully merging this pull request may close these issues.

4 participants