-
-
Save 8lane/c5505b06ea3eb3ba9f72ed3e48274b6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const movies = state.movies.map((movie) => { | |
if (movie.id === action.payload.id) { | |
return { | |
...movie, | |
count: action.payload.count | |
} | |
} | |
return movie | |
}) | |
return state.merge({ movies }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment