Is it okay to use the same reducer to update one of two state properties depending on other state value?
So let’s say hypothetically, I have one reducer where I want to either update state.propertyA OR state.propertyB depending on the value of state.propertyC. something like: const conditionalReducer: CaseReducer<StateType, PayloadActionType> = (state, action) => { if(state.propertyC === true) { state.propertyA = action.payload; } else { state.propertyB = action.payload; } } Is this considered good practice, or… Read More Is it okay to use the same reducer to update one of two state properties depending on other state value?