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:{ user: {username: '1'} }, subscriptions: { setup({dispatch}) { dispatch({type: 'getState'}); }, }, effects: { *getState({}, {call, put, select}) { const user = yield select(state=>state.user); ... }, },
取得的user值是undefined。 不知道哪里出了问题,请大神指点,谢谢! dva版本:1.2.1
The text was updated successfully, but these errors were encountered:
namespace 配了吗?
Sorry, something went wrong.
namespace: 'main',
yield select(state => state.main.user); 那得这样取,试着理解下 namespace 的含义。
yield select(state => state.main.user);
明白了,可以取到了,谢谢!
No branches or pull requests
取得的user值是undefined。
不知道哪里出了问题,请大神指点,谢谢!
dva版本:1.2.1
The text was updated successfully, but these errors were encountered: