Reputation: 23
am getting an error while i created small redux application error are like createstore is not exported don't know where i am wrong please help or tell me where i learn redux for best practices.
import {createstore} from 'redux';
import {composeWithDevTools} from 'redux-devtools-extension';
const initialState = {
todos : [
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
},
{
"userId": 1,
"id": 2,
"title": "quis ut nam facilis et officia qui",
"completed": false
},
{
"userId": 1,
"id": 3,
"title": "fugiat veniam minus",
"completed": false
}
]
}
const todoReducer = (state = initialState, action)=>{
switch(action.type){
default:
return state;
}
}
const store = createstore(todoReducer);
export default store;
Upvotes: 1
Views: 5180
Reputation: 2961
It is createStore
not createstore
. You have a typo in your code.
import {createStore} from "redux"
Upvotes: 2