嗨,我怎样才能从另一个减速器获得价值?
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 - 应该返回一个存储在另一个 reducer 中的值
它是我的userReducer代码:
let initialState = {
user_balance: 0
};