reactotron
reactotron copied to clipboard
createEnhancer() is not a function
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!
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
.
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
Thanks @Alirez14 you saved my day