Good evening, I have a small problem.
I code an application with React and Redux + Redux Toolkit and simply at the time of importing my reducer in the root reducer, therefore the rootReducer, I realize that my reducer therefore unReducer was not imported correctly, here is the problem.
I put the scope of my rootReducer.js in attachment with a focus on the module in question so FormConnexionReducer which is equivalent to unReducer in my code.
Thank you in advance for your answers.
unReducer.js
//importation des dépendances
const unReducer = createSlice({
name: 'unReducer',
initialState: {
a: '',
b: '',
},
reducers: {
print_a: () => console.log(a),
print_b: () => console.log(b)
},
});
const {print_a, print_b} = unReducer.actions;
export const print_aAction = () =>
ApplicationStore.dispatch(print_a());
export const print_bAction = () =>
ApplicationStore.dispatch(print_b());
export default unReducer.reducer;
rootReducer.js
import {combineReducers} from 'redux';
import {default as unReducer} from 'unReducer.js';
export default combineReducers({ // breakpoint, the picture of the scope is at the end of the post
unReducer,
});
breakpoint scope CLICK ON THE LINK TO SEE THE PICTURE
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…