reactotron: [V2] Reactotron-Redux Integration Problems

Doing a new installation using the V2 beta and having troubles getting the Redux integration working. Using:

"reactotron-react-native": "2.0.0-beta.10",
"reactotron-redux": "2.0.0-beta.10",
"reactotron-redux-saga": "2.0.0-beta.10",
[Entry point]
import "../services/reactotron/reactotron-config"
import Reactotron from "reactotron-react-native"

const store = Reactotron.createStore(rootReducer)

And my config is set up with the plugin.

Getting the following error though: “message”: “undefined is not a function (evaluating ‘a(b.apply(undefined, arguments))’)”, and before that seeing a failure of: null is not an object (evaluating ‘reduxStore.getState’) – presuming this is from the plugin.

When I use just redux the implementation works just fine. Anyone have any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@adrienthiery there is a bug in the source code. I have created PR to fix it. https://github.com/infinitered/reactotron/pull/878

@adrienthiery things doesn’t change, even I put all the code in one file.

import rootReducer from './reducer'
import Reactotron from 'reactotron-react-native'
import { reactotronRedux } from 'reactotron-redux' 

let instance = Reactotron
  .configure() // controls connection & communication settings
  .useReactNative() // add all built-in react native plugins
  .use(reactotronRedux())
  .connect()

export default instance.createStore(rootReducer)
export { RootState } from './reducer'

the crash happened in redux, compose.js

  return funcs.reduce(function (a, b) {
    return function () {
      return a(b.apply(undefined, arguments));   // a is not a function.
    };
  });

Hi there,

I was setting that up today and encountered the same issue.

It seems to me that it is because the use Reactotron's createStore statement is misleading, 'cause it pushes you to do :

import Reactotron from "reactotron-react-native"

const store = Reactotron.createStore(rootReducer)

when it expects you to use the result of the ReactotronConfig.js:

// ReactotronConfig.js
import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';

const reactotron = Reactotron
    .configure({ name: 'Morcare' })
    .use(reactotronRedux())
    .useReactNative()
    .connect();

export default reactotron;
// store.js
- import { createStore } from 'redux'
+ import Reactotron from '../ReactotronConfig'

- const store = createStore(rootReducer)
+ const store = Reactotron.createStore(rootReducer)

I proposed to clarify the docs : https://github.com/infinitered/reactotron/pull/773

Docs updated by @adrienthiery cuz he’s awesome. ❤️

import Reactotron, {
  trackGlobalErrors,
  openInEditor,
  overlay,
  asyncStorage,
  networking,
} from "reactotron-react-native"
import { reactotronRedux } from "reactotron-redux"
// import sagaPlugin from "reactotron-redux-saga"

Reactotron.configure({
  name: "React Native Demo",
})
  .use(trackGlobalErrors())
  .use(openInEditor())
  .use(overlay())
  .use(asyncStorage())
  .use(networking())
  .use(reactotronRedux())
  // .use(sagaPlugin())
  .connect()

Commented out the saga plugin until I get the redux plugin working first.

It almost feels like Reactotron.createStore is being called before reactotron is setup. Can you show whats in reactotron-config?