0

I'm trying to connect to api in react native and I'm using Redux and reactotron to monitor. He is returning this error to me below, I have already updated the libraries and so far I cannot identify the error.

import { persistStore } from 'redux-persist';
import createSagaMiddleware from 'redux-saga';

import createStore from './createStore';
import persistReducers from './persirstReducers';

import rootReducer from './modules/rootReducer';
import rootSaga from './modules/rootSaga';

const sagaMonitor = __DEV__ ? console.tron.createSagaMonitor() : null;

const sagaMiddleware = createSagaMiddleware({ sagaMonitor });

const middlewares = [sagaMiddleware];

const store = createStore(persistReducers(rootReducer), middlewares);
const persistor = persistStore(store);

sagaMiddleware.run(rootSaga);

export { store, persistor };

enter image description here

RoktSe
  • 419
  • 1
  • 4
  • 22

2 Answers2

0

you need to add sagaPlugin like docs say

I have the same problem and I figured out that it needs sagaPlugin to be use

LeonHeart
  • 539
  • 8
  • 10
0

You possibly didn't import ReactotronConfig in App.js, I had the same problem and it worked for me.

Example:

import './src/config/ReactotronConfig';
import store from './src/store';

export default function App() {
 return (
    <>
      <Provider store={store}>
        <Background>
          <StatusBar
            barStyle="light-content"
            backgroundColor="transparent"
            translucent
          />
          {fontsLoaded ? <Routes /> : <Loading />}
        </Background>
      </Provider>
    </>
  );
}