【发布时间】:2021-04-05 16:39:34
【问题描述】:
我不明白: 我有一个商店,我已经安装了 redux-devtools-extension 来跟踪我的树商店。
但是 devtool 在我的 react native 应用中找不到我的商店。
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import authReducer from './store/reducers/auth';
const rootReducer = combineReducers({
auth: authReducer,
})
const store = createStore(rootReducer, {}, composeWithDevTools(
applyMiddleware(ReduxThunk),
));
这是我的包版本:
"react-native-debugger-open": "^0.3.25",
"redux-devtools-extension": "^2.13.9",
"react-redux": "^7.2.3",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0"
我不明白问题出在哪里。
你能帮帮我吗?
【问题讨论】:
-
您是否将您的应用程序包装在 react-redux Provider 组件中?
-
是的!我在我的应用程序中做到了。在我的应用中添加商店工作。只是我在调试器上看不到它
-
你的组件连接到商店了吗?
-
@docmurloc 是的,我做到了。我在我的组件中使用我的商店。但是,“将您的组件连接到商店”是什么意思?
标签: reactjs react-native debugging redux react-redux