我使用的是:
"react-native": "0.63.3",
"react": "16.13.1",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0"这是我的redux商店的样子:
const persistConfig = {
key: 'root',
storage: AsyncStorage,
whitelist: ['auth', 'user', 'whiteCommonData'], //only navigation will be persisted
};
const initialState = {};
const middleWare = [thunk];
// if (process.env.NODE_ENV !== 'production') {
// middleware.push(createLogger());
// }
middleWare.push(createLogger());
const persistedReducer = persistReducer(persistConfig, rootReducer);
// const composeEnhancers = composeWithDevTools({
// // Specify name here, actionsBlacklist, actionsCreators and other options if needed
// });
const composeEnhancers =
(typeof window !== 'undefined' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
export const store = createStore(
persistedReducer,
// undefined,
composeEnhancers(applyMiddleware(...middleWare)),
);
export const persistor = persistStore(store);我阅读了文档,并按照它所说的做了一切,但我无法让它工作,chrome扩展没有显示redux状态。

我尝试了redux-devtools-extension ducimentation的Soultion1.1和1.3,但什么都没有改变。我也读过this、this和this,但没有一个对我有帮助。我怎么才能让它工作呢?
发布于 2020-12-01 05:37:19
我不能让它工作。我试过react-native-debugger ,它工作得很好。
这是我的store.js:
const persistConfig = {
key: 'root',
storage: AsyncStorage,
whitelist: ['auth', 'user', 'whiteCommonData'], //only navigation will be persisted
};
const initialState = {};
const middleWare = [thunk];
// if (process.env.NODE_ENV !== 'production') {
// middleware.push(createLogger());
// }
middleWare.push(createLogger());
const persistedReducer = persistReducer(persistConfig, rootReducer);
// const composeEnhancers = composeWithDevTools({
// // Specify name here, actionsBlacklist, actionsCreators and other options if needed
// });
const composeEnhancers =
(typeof window !== 'undefined' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
// const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
export const store = createStore(
persistedReducer,
// undefined,
composeEnhancers(applyMiddleware(...middleWare)),
);
export const persistor = persistStore(store);https://stackoverflow.com/questions/65074997
复制相似问题