Error with redux-saga middleware
See original GitHub issueNoob here getting an error which seems to indicate that the saga middleware is not getting loaded properly with the store.
F:\Courses\react-native-redux\manager\node_modules\react-native\Libraries\Core\ExceptionsManager.js:71uncaught at check Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware
Here is my store setup:
/* eslint-disable no-underscore-dangle */
const sagaMiddleware = createSagaMiddleware();
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION__ || compose;
const store = createStore(
reducers,
initialState,
composeEnhancers(applyMiddleware(sagaMiddleware)),
);
sagaMiddleware.run(sagas);
/* eslint-enable */
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error Handling | Redux-Saga
We want to handle those errors inside our Saga by dispatching a PRODUCTS_REQUEST_FAILED action to the Store. We can catch errors inside the...
Read more >Redux Saga Error Handling. Problem - Yini Yin - Medium
So we have to options here: 1. Add an onError function to the middleware option. 2. Chain a catch function at returned promise...
Read more >Error Handling Pattern with React and Redux-Saga - Outcrawl
Here's a pattern I've been using to deal with failure states on request/response type actions when using Redux with Redux-Saga.
Read more >Redux Saga Error Handling | Welcome to Yini's blog
Add an onError function to the middleware option. Chain a catch function at returned promise of sagaMiddleware.run(). import { createStore ...
Read more >how can I setup a global error handler? #1672 - GitHub
const rootTask = sagaMiddleware.run(rootSaga); rootTask.done.catch(function (err) { console.log("Error in Sagas", err); });.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you want to take compose function, should use
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
instead of__REDUX_DEVTOOLS_EXTENSION__
enhancer.Let me know if it work for you. 😃
Ok, because this project is based on official debugger, it’s may still a long-term problem. 🤔 (https://github.com/facebook/react-native/issues/5632)
I’m closing this issue because the title problem is resolved.