diff --git a/guide/english/certifications/front-end-libraries/redux/use-the-spread-operator-on-arrays/index.md b/guide/english/certifications/front-end-libraries/redux/use-the-spread-operator-on-arrays/index.md index 79af8c61b6..8f9b9fad41 100644 --- a/guide/english/certifications/front-end-libraries/redux/use-the-spread-operator-on-arrays/index.md +++ b/guide/english/certifications/front-end-libraries/redux/use-the-spread-operator-on-arrays/index.md @@ -12,8 +12,7 @@ const immutableReducer = (state = ['Do not mutate state!'], action) => { switch(action.type) { case 'ADD_TO_DO': // don't mutate state here or the tests will fail - let arr = [...state]; - arr.push(action.todo); + let arr = [...state, action.todo]; return arr; default: return state;