React-native-debugger: Error with redux-saga middleware

Created on 15 Nov 2016  路  5Comments  路  Source: jhen0409/react-native-debugger

Noob 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\managernode_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 */
question

Most helpful comment

/* 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 */

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. :)

All 5 comments

/* 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 */

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. :)

Nice! Thanks, it works now :) It's interesting that it worked find with 'REDUX_DEVTOOLS_EXTENSION' before using this debugger.
One thing though, I'm still suffering from the very slow animation bug when remote debugging is on. Am I missing another setup somewhere?
Forgot to add that I'm on Windows 10 and using Genymotion.

One thing though, I'm still suffering from the very slow animation bug when remote debugging is on. Am I missing another setup somewhere?

It only happens here but http://localhost: 8081/debugger-ui not? If true the problem may comes from the react inspector? Try to disable setupDevtools of react-native.

It DOES happen at http://localhost: 8081/debugger-ui. That's the main reason why I was trying to find another debugger and found this one.
I'm not sure if that's what you meant but I used 'Toggle React DevTools' from the View menu and there was a small improvement but there is still a big lag.

It DOES happen at http://localhost: 8081/debugger-ui.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghasemikasra39 picture ghasemikasra39  路  3Comments

buncis picture buncis  路  5Comments

Ashoat picture Ashoat  路  4Comments

MailosT picture MailosT  路  4Comments

NathHorrigan picture NathHorrigan  路  6Comments