-
Notifications
You must be signed in to change notification settings - Fork 203
user页面会重复渲染 #25
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
Comments
仔细看了下,User 列表页面会渲染三次:
effect 应该是只能读取 state 而不能修改 state,要修改数据,只能在 reduce 中修改。这样 effect 里面的代码应该不会导致页面刷新啊? |
找到原因了,第二次是由于Step 8. 通过 dva-loading 处理 loading 状态导致的,loading 状态是另外一个 model了,而 |
不能只渲染一次么? |
@allinshang 这里的做法是先显示空白数据页面,然后取到数据后再次渲染,这样用户体验会好点。当然你也可以先准备好数据,然后再跳转到这个页面。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: