Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default function reducer(state:IPlayersStatState = initialState, action:IAction): IPlayersStatState {
- switch (action.type) {
- case SET: {
- const { id, speed } = action.payload;
- return update(state, {
- [id]: (cur:IPlayerStatState) => update(cur || initialPlayerState, {$set: {speed}})
- });
- }
- default: return state;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement