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 18 中,会清空useRef 吗 #293

Open
CurryHan opened this issue Oct 19, 2023 · 3 comments
Open

React 18 中,会清空useRef 吗 #293

CurryHan opened this issue Oct 19, 2023 · 3 comments

Comments

@CurryHan
Copy link

发现回到缓存页面,useRef().current为null

@CurryHan
Copy link
Author

发现还是跟react18的 createRoot有关,使用ReactDOM.render正常

@CurryHan
Copy link
Author

请问有办法修复吗

@CJY0208
Copy link
Owner

CJY0208 commented Oct 24, 2023

如果可以的话,希望提供一个在线示例,最近比较忙

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