Tell us what’s happening:
I am trying to understand working on Redux and here in the screenshot, I tried to console.log before and after dispatching, but I do not see any changes in the object in the log. Should there be any changes? Am I missing something?
Your code so far
const store = Redux.createStore(
(state = {login: false}) => state
);
const loginAction = () => {
return {
type: 'LOGIN'
}
};
console.log(store,"before")
// Dispatch the action here:
store.dispatch(loginAction())
console.log(store,"after")
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Challenge: Redux - Dispatch an Action Event
Link to the challenge: