こんにちは、別のレデューサーから値を取得するにはどうすればよいですか?
const indexReducer = (state = initialState, action) => {
switch (action.type) {
case CALC_BET_AMOUNT:
function calcBetAmount(value) {
switch (value) {
case 'max':
return userReducer.user_balance;
default:
return state;
}
}
}
}
return userReducer.user_balance - 別のレデューサーに格納されている値を返す必要があります
その私のuserReducerコード:
let initialState = {
user_balance: 0
};