Reputation: 3498
Iam a newbie to redux.I imported createStore,combineReducers from redux and these work fine.
import {createStore,combineReducers} from "redux";
But iam unable to use applyMiddleWare
import {createStore,combineReducers,applyMiddleWare} from "redux";
The error is
./src/index.js 63:101-116 'redux' does not contain an export named 'applyMiddleWare'.
and when i try to import like this
import applyMiddleWare,{createStore,combineReducers} from "redux";
It shows
./src/index.js 63:101-116 "export 'default' (imported as 'applyMiddleWare') was not found in 'redux'
I did not change or modified any packages. My Package.json shows dependencies as
"dependencies": {
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-redux": "^5.0.7",
"react-scripts": "1.1.4",
"redux":"^4.0.0",
"redux-logger": "3.0.6"
}
Advance thanks for helping!!
Upvotes: 5
Views: 6029
Reputation: 715
The 'w' in the applyMiddleWare should be small while importing. applyMiddleware
So you should import like:
import { applyMiddleware } from 'redux';
Upvotes: 15