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

Make ReactDOM.createPortal() official #10675

Merged
merged 2 commits into from
Sep 11, 2017
Merged

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Sep 11, 2017

We might later want to move portal creation to React API that would be renderer-agnostic and work across renderers but it's likely that it will be a superset of the current API.

So we might as well call the current API "stable". Especially because it's the only migration path for top-level render returning null inside a batch in 16.

See individual commits. I added validation because otherwise you get a very confusing error when you pass something else. Also helps us make it clear it's currently not supported by SSR.

Open question: what happens if you do {isClient && ReactDOM.createPortal(...)}? Does it cause a mismatch on initial render? I don't know. Worth checking.

@gaearon gaearon merged commit 89508f2 into facebook:master Sep 11, 2017
@gaearon gaearon deleted the portal-stuff branch September 11, 2017 21:24
@koba04 koba04 mentioned this pull request Sep 12, 2017
@thysultan thysultan mentioned this pull request Sep 12, 2017
@ntucker
Copy link

ntucker commented Sep 13, 2017

Is there documentation on this anywhere?

@gaearon
Copy link
Collaborator Author

gaearon commented Sep 13, 2017

There will be. :-)

@Nantris
Copy link

Nantris commented Sep 24, 2017

@gaearon Do you have a rough idea of when the documentation will be available? A week? A month?

Thanks very much!

@gaearon
Copy link
Collaborator Author

gaearon commented Sep 24, 2017

Together with React 16, in a few days. We provide documentation for new features at the same time they are released.

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.

5 participants