Tell us what’s happening:
Describe your issue in detail here.
why 1 test case not passing
Your code so far
const defaultState = {
login: false
};
const reducer = (state = defaultState, action) => {
// Change code below this line
if(action.type ==='LOGIN'){
state.login : true
}
else {
return state;
}
// Change code above this line
};
const store = Redux.createStore(reducer);
const loginAction = () => {
return {
type: 'LOGIN'
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Challenge: Redux - Handle an Action in the Store
Link to the challenge: