无法连接反应本机应用程序w / remote redux devtools

时间:2017-02-20 13:57:42

标签: react-native react-redux redux-devtools-extension

我无法使用redux将我的react-native应用程序连接到redux-devtools-extensionremote-redux-devtools

我在macOSX Sierra上使用通过USB连接的android设备。

// 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已正确配置到应用程序中,带有简单的按钮操作来更新redux状态。

但它找不到任何商店。

no redux store found

我错过了什么?

2 个答案:

答案 0 :(得分:0)

请尝试使用此代码:

SELECT *, CASE WHEN true THEN 0 END as score, CASE WHEN "skill_missions"."skill_id" IN (1) THEN score = score + 1 END, CASE WHEN "skill_missions"."skill_id" IN (2) THEN score = score + 1 END FROM missions LEFT OUTER JOIN "skill_missions" ON "skill_missions"."mission_id" = "missions"."id"

答案 1 :(得分:0)

在Chrome插件中选择Open remote DevTools

enter image description here