Skip to content

Improve and simplify findComponentRoot, do not optimistically traverse foreign nodes #2262

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

Closed
wants to merge 1 commit into from

Conversation

syranide
Copy link
Contributor

Based on code from #1570
Supersedes #2261 (#2005 for why I think optimistic traversal of foreign nodes is bad).

Improved and simplified implementation of findComponentRoot. Makes less use of the "hacky" ReactInstanceHandles. Once _parentComponent makes it appearance, one way or another, the dependency on ReactInstanceHandles can be dropped entirely (which is very good).

  • Test plan: grunt test and manual testing in our app
  • If approved: test and tidy up the code, but I imagine there's too much friction for this PR now
   raw     gz Compared to master @ 57de1b07d0b58d5a76d46ee8b429d7d74d175c99
  -900   -532 build/react-with-addons.js
  -171    -82 build/react-with-addons.min.js
  -900   -500 build/react.js
  -171    -78 build/react.min.js

@sophiebits
Copy link
Collaborator

I rewrote all this so everything should be fixed here.

@sophiebits sophiebits closed this Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants