Cuéntanos qué está pasando:
Describe tu problema en detalle aquí.
**Tu código hasta el momento**
const ADD = 'ADD';
const reducer = (state = 0, action) => {
switch(action.type) {
case ADD:
return state + 1;
default:
return state;
}
};
const store = Redux.createStore(reducer);
// Variable global count:
let count = 1;
const addOne = () => (count += 1);
// Cambia el código debajo de esta línea
function (){
if
}
// Cambia el código encima de esta línea
store.dispatch({type: ADD});
console.log(count);
store.dispatch({type: ADD});
console.log(count);
store.dispatch({type: ADD});
console.log(count);
**Información de tu navegador:**
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36 OPR/86.0.4363.64
Desafío: Registra un escucha al almacén
Enlaza al desafío: