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

This writing will cause error of "store.runSagaTask is not function", Please correct #4057

Closed
minooo opened this issue Mar 26, 2018 · 4 comments
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@minooo
Copy link

minooo commented Mar 26, 2018

https://github.com/zeit/next.js/blob/603b90ce02851c3df0d40045f780be7e4e278be9/examples/with-redux-saga/store.js#L26

This is my solution

delete
store.sagaTask = sagaMiddleware.run(rootSaga)

and add

store.runSagaTask = () => {
    store.sagaTask = sagaMiddleware.run(rootSaga)
  }

// run the rootSaga initially
store.runSagaTask()
@thengor
Copy link

thengor commented Mar 28, 2018

Thanks! I got the same error.

@zhengqingxin
Copy link

I got it too.

@timneutkens
Copy link
Member

@minooo why not send a pull request?

@timneutkens timneutkens added help wanted good first issue Easy to fix issues, good for newcomers labels Mar 31, 2018
@minooo
Copy link
Author

minooo commented Apr 2, 2018

@timneutkens O,I would do this next time

@minooo minooo closed this as completed Apr 2, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants