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

请问为什么要在componentWillUpdate中判断登录状态呢 #1

Open
yshkk opened this issue Dec 19, 2017 · 1 comment
Open

请问为什么要在componentWillUpdate中判断登录状态呢 #1

yshkk opened this issue Dec 19, 2017 · 1 comment

Comments

@yshkk
Copy link

yshkk commented Dec 19, 2017

componentWillUpdate(nextProps) {

按文档中描述的场景是用户刷新页面之后登录状态消失了,我理解是只需要在didmount的时候判断一次就行了,componentWillUpdate里再触发action应该会再触发一次更新吧。

@xiyuyizhi
Copy link
Owner

我这里获取电影信息和附件是两个接口,附件的接口只有登录后才出发,Didmount执行时判断登录的接口还没返回

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