diff --git a/curriculum/challenges/english/03-front-end-development-libraries/redux/write-a-counter-with-redux.md b/curriculum/challenges/english/03-front-end-development-libraries/redux/write-a-counter-with-redux.md index 9bf25454c3..72779c2819 100644 --- a/curriculum/challenges/english/03-front-end-development-libraries/redux/write-a-counter-with-redux.md +++ b/curriculum/challenges/english/03-front-end-development-libraries/redux/write-a-counter-with-redux.md @@ -31,7 +31,7 @@ assert(decAction().type === DECREMENT); The Redux store should initialize with a `state` of 0. ```js -assert(store.getState() === 0); +assert(_store.getState() === 0); ``` Dispatching `incAction` on the Redux store should increment the `state` by 1. @@ -39,9 +39,9 @@ Dispatching `incAction` on the Redux store should increment the `state` by 1. ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(incAction()); - const incState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(incAction()); + const incState = _store.getState(); return initialState + 1 === incState; })() ); @@ -52,9 +52,9 @@ Dispatching `decAction` on the Redux store should decrement the `state` by 1. ```js assert( (function () { - const initialState = store.getState(); - store.dispatch(decAction()); - const decState = store.getState(); + const initialState = _store.getState(); + _store.dispatch(decAction()); + const decState = _store.getState(); return initialState - 1 === decState; })() ); @@ -83,6 +83,12 @@ const decAction = null; // Define an action creator for decrementing const store = null; // Define the Redux store here, passing in your reducers ``` +## --after-user-code-- + +```js +const _store = Redux.createStore(counterReducer) +``` + # --solutions-- ```js