I don't know how to solve. Help please

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:

Hi @Francisco1 !

Welcome to the forum!

I would reset the lesson.

The lesson wants you to use the store.subscribe().
Inside that method you will pass in a function that will increment the count variable.

Hope that helps!

1 Like

If you need extra help take a look at this article here

Take a close look at the subscribe section where they use the store.subscribe() method and pass in a function.

1 Like