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

Walk down internal tree to find DOM node #4988

Merged
merged 1 commit into from
Oct 14, 2015
Merged

Conversation

sophiebits
Copy link
Collaborator

This reduces our reliance on hierarchical IDs.

@sophiebits
Copy link
Collaborator Author

@sebmarkbage This one's for you too. Does adding _renderedElement make sense? I did it so that the loop in getNativeComponentFromComposite can be more monomorphic.

@sophiebits
Copy link
Collaborator Author

^^ Updated to simplify code and remove empty component registry (now unnecessary!).

@jimfb
Copy link
Contributor

jimfb commented Sep 29, 2015

Looks good to me, I'm assuming this is also destined for 0.15.

@jimfb jimfb added this to the 0.15 milestone Sep 29, 2015
@sophiebits
Copy link
Collaborator Author

Yes.

@sophiebits
Copy link
Collaborator Author

@sebmarkbage You said you'd prefer to store the rendered node type (native, composite, or empty) on each composite rather than the actual element/node. Like this?

EMPTY: 2,

getType: function(node) {
if (node === null || node === false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this logic should be shared for guaranteed consistency? (instantiateReactComponent has it too)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah maybe that should use this.

This reduces our reliance on hierarchical IDs.
sophiebits added a commit that referenced this pull request Oct 14, 2015
Walk down internal tree to find DOM node
@sophiebits sophiebits merged commit 8e67b7f into facebook:master Oct 14, 2015
@facebook-github-bot
Copy link

@spicyj updated the pull request.

This pull request was closed.
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