score:31

Accepted answer

Why not react on the same action in both reducers? You could have code like this:

function status(state, action){
...
    switch(action.type){
        case BUY_ITEM: {
            return 'bought'
        }
    }
...
}

function market(state, action){
...
    switch(action.type){
        case BUY_ITEM: {
            return {...state, action.itemId : state[action.itemId] - 1 }
        }
    }
...
}

With whatever "reaction code" you need to perform.


Related Query

More Query from same tag