reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

createEnhancer() is not a function

Open iutin opened this issue 4 years ago • 5 comments

I have this issue... TypeError: _reactotronReactNative.default.createEnhancer is not a function. (In '_reactotronReactNative.default.createEnhancer()', '_reactotronReactNative.default.createEnhancer' is undefined)

"reactotron-react-native": "3.6.5", "reactotron-redux": "3.1.2",

My code: `

import {
  createStore,
  combineReducers
} from 'redux';
import Reactotron from 'reactotron-react-native';
import reducer from './reducers/RootReducer';

const mainReducer = combineReducers({
  root: reducer,
});

export default () => createStore(mainReducer, Reactotron.createEnhancer());

` Does someone have any suggestions? Thanks!

iutin avatar Mar 18 '20 21:03 iutin

In case anyone needs: it happened to me aswell.

In my case, I was missing these changes in my ReactotronConfig file:

+ import { reactotronRedux } from 'reactotron-redux';

 const tron = Reactotron.configure()
   .useReactNative()
+  .use(reactotronRedux())
   .setAsyncStorageHandler(AsyncStorage)
   .connect();

+ export default tron;

It seems that use(reactotronRedux()) adds a createEnhancer function on Reactotron.

renato-bohler avatar Mar 25 '20 19:03 renato-bohler

I have this issue... TypeError: _reactotronReactNative.default.createEnhancer is not a function. (In '_reactotronReactNative.default.createEnhancer()', '_reactotronReactNative.default.createEnhancer' is undefined)

"reactotron-react-native": "3.6.5", "reactotron-redux": "3.1.2",

My code: `

import {
  createStore,
  combineReducers
} from 'redux';
import Reactotron from 'reactotron-react-native';
import reducer from './reducers/RootReducer';

const mainReducer = combineReducers({
  root: reducer,
});

export default () => createStore(mainReducer, Reactotron.createEnhancer());

` Does someone have any suggestions? Thanks!

you must not import it from "import Reactotron from 'reactotron-react-native';" but rather " import reactotron from '../../ReactotronConfig';" --> config file which you have created

Alirez14 avatar Apr 15 '21 16:04 Alirez14

Thanks @Alirez14 you saved my day

sclavijo93 avatar Feb 01 '22 00:02 sclavijo93