Can someone help me solve this challenge?

Tell us what’s happening:

Your code so far


const reducer = (state = 5) => {
return state;
}

// Redux methods are available from a Redux object
// For example: Redux.createStore()
// Define the store here:
const store = createStore(store); 
Redux.createStore(reducer);

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10.0; S21 Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.116 Mobile Safari/537.36 EdgA/45.07.2.5059.

Challenge: Create a Redux Store

Link to the challenge:

Hi @Claeiyke. The instruction says:

Declare a store variable and assign it to the createStore() method, passing in the reducer as an argument.

You are supposed to create a store using Redux.createStore passing in a reducer. Have you done that? Essentially you are getting the error

Uncaught ReferenceError: createStore is not defined

Remove the second-last line of code and assign the last line to store. Does that make sense?

It made sense, thanks a lot.
const store = Redux.createStore(reducer);

you need this just creating and passing

var store ;
store = Redux.createStore(reducer)