We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
函数组件中,页面的状态与组件实际状态不一致,页面更像是一个快照,函数组件中的state都被初始化了。 函数组件有一个输入框 值为5,再次进入时页面也显示5,但是打印出来的却是初始值。感觉真实dom与react虚拟dom不一致。
The text was updated successfully, but these errors were encountered:
方便提供一下代码片段吗?正常情况下,不会出现这个问题,因为被缓存的组件,在 keepalive 期间,是不会被销毁的
Sorry, something went wrong.
No branches or pull requests
函数组件中,页面的状态与组件实际状态不一致,页面更像是一个快照,函数组件中的state都被初始化了。
函数组件有一个输入框 值为5,再次进入时页面也显示5,但是打印出来的却是初始值。感觉真实dom与react虚拟dom不一致。
The text was updated successfully, but these errors were encountered: