Help for redux problem

I cant find my mistake.

Your code so far

const INCREMENT = "INCREMENT"; // define a constant for increment action types
const DECREMENT = "DECREMENT"; // define a constant for decrement action types

const counterReducer = (state = 0, action) => {
switch (action.type){
    case INCREMENT:
    return (state += 1);

    case DECREMENT:
    return (state -= 1);

    return state
}; // define the counter reducer which will increment or decrement the state based on the action it receives

const incAction = () =>{
return {
    type: INCREMENT
}; // define an action creator for incrementing

const decAction = () => {
return {
}; // define an action creator for decrementing

const store = REDUX.createStore(counterReducer); // define the Redux store here, passing in your reducers

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362.

Challenge: Write a Counter with Redux

Link to the challenge:

It’s already a solution.

Identifiers are case sensitive. See it? Redux, not REDUX.

Is there a code correct?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.