const defaultState = {
login: false
};
const reducer = (state, action) => {
// change code below this line
if(action.type === “LOGIN”){
state.login = false
};
return state;
// change code above this line
};
const store = Redux.createStore(reducer, defaultState);
const loginAction = () => {
return {
type: ‘LOGIN’
}
};
store.dispatch(loginAction());
expected result: Dispatching loginAction should update the login property in the store state to true.
my solution passes all test expect this one