DEV Community

Discussion on: A type-safe approach to Redux stores in TypeScript

Collapse
 
buinauskas profile image
Evaldas Buinauskas • Edited

I'm wondering if there isn't any typo in reducers?

Shouldn't the following line return { ...state, connectedUsers: action.users };
be return { ...state, connectedUsers: action.payload.users };?

Collapse
 
resir014 profile image
Resi Respati

Yes, that should be correct, fixing that now. Thanks for noticing!