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

一直显示saga没有绑到store上 #51

Open
lllzzzggg opened this issue Aug 13, 2018 · 3 comments
Open

一直显示saga没有绑到store上 #51

lllzzzggg opened this issue Aug 13, 2018 · 3 comments

Comments

@lllzzzggg
Copy link

Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware

@lllzzzggg
Copy link
Author

const sagaMiddleware = createSagaMiddleware()
const store = createStore(
reducer,
applyMiddleware(createSagaMiddleware(helloSaga))
)
sagaMiddleware.run(helloSaga)

@astonishqft
Copy link

改成下面这样就好了
const sagaMiddleware = createSagaMiddleware()
const store = createStore(
reducer,
applyMiddleware(sagaMiddleware)
)
sagaMiddleware.run(helloSaga)

@wind8866
Copy link

wind8866 commented Dec 2, 2018

改成下面这样就好了
const sagaMiddleware = createSagaMiddleware()
const store = createStore(
reducer,
applyMiddleware(sagaMiddleware)
)
sagaMiddleware.run(helloSaga)
@astonishqft

不执行,最后一行改为sagaMiddleware.run(rootSaga)就可以了

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

3 participants