我有两个还原器学生还原器和员工还原器,我想在我的代码中使用这两个还原器,但我不知道如何做到这一点请帮助我。
import React from 'react'
import { Provider as PaperProvider } from 'react-native-paper'
import AppNavigator from './src/navigation'
import { Provider as StoreProvider } from 'react-redux'
import { createStore, combineReducers } from 'redux';
import studentReducer from './src/store/reducers/studentStore'
import employeeReducer from './src/store/reducers/employeeStore'
const rootReducer = combineReducers({
stuedntReducer,
employeeReducer,
});
const store = createStore(rootReducer);
export default function App() {
return (
<StoreProvider store={store}>
<PaperProvider>
<AppNavigator />
</PaperProvider>
</StoreProvider>
)
}
2条答案
按热度按时间oxosxuxt1#
我不知道你有没有
Reference Error
,但看看这个。您已导入
并在
combineReducer()
中使用了所以
stuedntReducer
!56lgkhnf2#