Cannot connect react native app w/ remote redux devtools
Asked Answered
M

1

7

I cannot connect my react-native app using redux to redux-devtools-extension through remote-redux-devtools.

I am using android device connected by USB on macOSX Sierra.

// configureStore.js
import { createStore, applyMiddleware } from "redux";
import { composeWithDevTools } from 'remote-redux-devtools';
import thunk from "redux-thunk";
import rootReducer from "./reducers";

const composeEnhancers = composeWithDevTools({ realtime: true });

export default function configureStore(initialState) {
  const store = createStore(
    rootReducer,
    initialState,
    composeEnhancers(
      applyMiddleware(thunk),
    )
  );

  if (module.hot) {
    // Enable hot module replacement for reducers
    module.hot.accept(() => {
      const nextRootReducer = require('./reducers/index').default;
      store.replaceReducer(nextRootReducer);
    });
  }

  return store;
};

Redux is correctly configured into the app, w/ a simple button action to update redux state.

But it cannot found any store.

no redux store found

What am I missing ?

Mahound answered 20/2, 2017 at 13:57 Comment(1)
i have same problemDelirium
H
0

Try using this instead:

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose

Haymow answered 21/2, 2017 at 2:33 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.