
I am trying to use the Reactotron.createStore, but it gives me this error...
I was able to make this work if I put all redux, createStore, middleware, saga, ... in the same file.
But, I am not getting what configuration I am done wrong when I split this on different files.
I create a repository to reproduce this problem: marciobueno1/Reactotron-Navigation-Redux-Example
Everything works (without reactotron connection) if in file store.js I use the createStore from the 'redux' package.
Thanks for the repro. Makes it nice to track these things down.
Two things:
There's a bug in Reactotron that I'll fix up. But you need a 3rd parameter to be a identity function if you're not using middleware. Change that line to:
const store = Reactotron.createStore(reducer, {}, sorry => sorry)
I'll fix that up.
The other issue is: for React Native projects, everything you need (out of the box at least) is in the babel-preset-react-native. So that means, remove your extra stuff in .babelrc (just leave the react-native preset. Also, remove those extra babel things in your node_modules. Don't need 'em anymore.
Lemme know if that gets you up & running. Don't forget to clear the React Native packager cache. npm start -- --reset-cache.
Feel free to re-open if it doesn't.
Thanks for taking your time to having a look on this, now it is working...
I pushed the changes to my repository removing all babel and eslint related things...
Later, I will try to put some of the eslint config to see if it still works...
I have the same problem and solution with 3rd parameter is not working.
@mradziwon, did you check your package.json to see if there is another babel package that can cause the problem?
My bad. It was connected to babel settings.
Have same issue. I have reloaded my mac and get that error.
Probably best to open a new issue. Try to rule out the --reset-cache issue and that you're not running the chrome debugger.
Most helpful comment
My bad. It was connected to babel settings.