我无法使用redux将我的react-native应用程序连接到redux-devtools-extension到remote-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状态。
但它找不到任何商店。
我错过了什么?
答案 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)