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

Use incrementing numerical IDs to identify DOM components #5205

Merged
merged 18 commits into from Nov 4, 2015

Conversation

Projects
None yet
4 participants
@sophiebits
Copy link
Collaborator

commented Oct 18, 2015

Builds on #5190. So... ignore the first 10 commits.

@facebook-github-bot

This comment has been minimized.

Copy link

commented Oct 19, 2015

@spicyj updated the pull request.

sophiebits added some commits Oct 15, 2015

Always do useCreateElement for updates
Initial render can still be a markup string.
ReactDOMComponentTree
New module! With this, we have a new module that uses the component tree to store DOM nodes. Most of the logic in this file relates to markup adoption -- if we were to drop that (along with server rendering) this file could just be a `return inst._nativeNode;`.

This works with useCreateElement only because we need to reference each node as it's created.

Events is now the only thing using ReactMount.getNode -- I'll introduce pointers back from the DOM nodes (and a `ReactDOMComponentTree.getInstanceFromNode`) and make that work.

@sophiebits sophiebits force-pushed the sophiebits:cotree-num branch from d0e7fec to a906911 Nov 4, 2015

@facebook-github-bot

This comment has been minimized.

Copy link

commented Nov 4, 2015

@spicyj updated the pull request.

@sebmarkbage

This comment has been minimized.

Copy link
Member

commented Nov 4, 2015

Good luck!

sophiebits added some commits Oct 17, 2015

Events: Pass native instances up until propagation
Next step: take advantage of having the native instances in EventPropagators instead of converting right back to IDs.
put/deleteListener take an instance, not an ID
This removes SimpleEventPlugin's dependency on ReactMount.getID.
Turn ReactInstanceHandles-test into ReactDOMTreeTraversal-test
This test relied on the fact that ReactDOMComponent still produced hierarchical IDs -- although this module could be used standalone, we're replacing it completely so it makes more sense to just move the tests over to test ReactDOMTreeTraversal.
Remove unused modules
- Remove last references to ReactInstanceHandles (still used in responder unit test)
- Remove ClientReactRootIndex/ServerReactRootIndex

@sophiebits sophiebits force-pushed the sophiebits:cotree-num branch from a906911 to c193d1a Nov 4, 2015

@facebook-github-bot

This comment has been minimized.

Copy link

commented Nov 4, 2015

@spicyj updated the pull request.

sophiebits added a commit that referenced this pull request Nov 4, 2015

Merge pull request #5205 from spicyj/cotree-num
Use incrementing numerical IDs to identify DOM components

@sophiebits sophiebits merged commit 35962a0 into facebook:master Nov 4, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@afraser

This comment has been minimized.

Copy link

commented Apr 8, 2016

Is there any way that this could cause problems when using an older version of React on the same page?

@sophiebits

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 8, 2016

Good question. I think this should probably be fine alongside 0.14 but didn't test.

@afraser

This comment has been minimized.

Copy link

commented Apr 8, 2016

I'm wondering about 0.13.3 in particular. If I don't get an answer here I'll let you all know what I find when I dive in.

@arohner arohner referenced this pull request Jul 21, 2016

Merged

Fix server-side rendering. #3

@renovate renovate bot referenced this pull request Feb 2, 2018

Open

Update dependency react to v0.14.9 #29

0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.