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

使用 react createPortal 开发 模态组件的应用 #28

Open
aototo opened this issue Aug 27, 2019 · 0 comments
Open

使用 react createPortal 开发 模态组件的应用 #28

aototo opened this issue Aug 27, 2019 · 0 comments

Comments

@aototo
Copy link
Owner

aototo commented Aug 27, 2019

Portals 提供了一种很好的方法,将子节点渲染到父组件 DOM 层次结构之外的 DOM 节点。

官方文档:http://react.html.cn/docs/portals.html

如果说 ReactDOM.render and ReactDOM.createPortal 有什么区别

可以看 https://codesandbox.io/s/42x771ykwx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant