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

StrictMode 经验收集 #53

Open
liyatang opened this issue Nov 13, 2018 · 2 comments
Open

StrictMode 经验收集 #53

liyatang opened this issue Nov 13, 2018 · 2 comments

Comments

@liyatang
Copy link
Contributor

沉淀下来,方便其他人快速解决问题

@Chaoming-L
Copy link

Chaoming-L commented Nov 13, 2018

image
老式拿取dom:
image
React 16.3 之后,建议这样拿dom:
image

参考链接: https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage

@Chaoming-L
Copy link

React 16.3 之后, 新的ref创建方法:
image
参考链接: https://reactjs.org/docs/refs-and-the-dom.html

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

2 participants