Skip to content

Conversation

@sophiebits
Copy link
Collaborator

Fixes #1392.

I think this makes sense; it's useful to be able to reorder components without rerendering them while having refs that correspond to the current indices.

Test Plan: grunt test

Fixes facebook#1392.

I think this makes sense; it's useful to be able to reorder components without rerendering them while having refs that correspond to the current indices.

Test Plan: grunt test
@syranide
Copy link
Contributor

If I understand you correctly, the ref for a component is not updated unless the component also updates? That sounds like a bug to me.

@sophiebits
Copy link
Collaborator Author

Yes; the test here failed before with static0's text still A and static1's text still B because the refs weren't updated.

@chenglou
Copy link
Contributor

Internal diff uncreated, lol.

@sophiebits
Copy link
Collaborator Author

Just wrote #1560 which should make it easier to refactor this to make more sense.

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@zpao
Copy link
Member

zpao commented Jul 30, 2014

@sebmarkbage Can you close this out if we're not going to move forward?

@sophiebits sophiebits closed this Jul 30, 2014
@sebmarkbage
Copy link
Contributor

This probably still makes sense to fix if we can do it non-hacky.

@sophiebits
Copy link
Collaborator Author

Yeah, planning on it.

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.

Refs should be updated even if shouldComponentUpdate returns false

6 participants