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

Nested Render Trees #3210

Closed
sebmarkbage opened this issue Feb 20, 2015 · 5 comments
Closed

Nested Render Trees #3210

sebmarkbage opened this issue Feb 20, 2015 · 5 comments

Comments

@sebmarkbage
Copy link
Collaborator

The way we implement portals is through a nested React.render in componentDidMount/Update. This is also how react-art can switch render mode in the middle of the tree.

This comes with a few problems.

  1. We can't reason about the depth of a component. Which is why we had to implement mountOrder.
  2. We can't reason about its position in the tree for debugging purposes (react-devtools).
  3. We can't pass the context through to the next subtree.

We should have a first-class concept of nested render trees, that can optionally use a different render mode.

@sophiebits
Copy link
Collaborator

Would be nice to figure out how event bubbling works as well (cf. #1696).

@jimfb
Copy link
Contributor

jimfb commented Jun 11, 2015

for reference: see ReactWithAddons.renderSubtreeIntoContainer

@slorber
Copy link
Contributor

slorber commented Dec 11, 2015

I use renderSubtreeIntoContainer with success in conjunction with Tether

Will it change in the future?

@sophiebits
Copy link
Collaborator

Probably sometime, but no new proposal at the moment.

@gaearon
Copy link
Collaborator

gaearon commented Oct 2, 2017

We have portals now.

They're not cross-renderer yet but I think the use cases in this thread are fixed.

@gaearon gaearon closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants