javascript - React Redux History error - TypeError: (0 , _history2.default) is not a function -
history 2.0.0-rc2
followed this example verbatim and:
import { createhistory } 'history'; import { applymiddleware, compose, createstore } 'redux'; import { synchistory } 'react-router-redux'; const history = createhistory(); //<-- ***this line failing!!!*** const routingmiddleware = synchistory(history); ...creating history failing typeerror: (0 , _history2.default) not function. i've tried without {} , tried importing createbrowserhistory same result. missing? opened against history said don't bugs please post on stackoverflow.
it looks wrong npm package history.
try running npm ls|grep history see version have installed. ensure on latest version (2.0.0-rc2).
you can try deleting node_modules/history , reinstalling it.
Comments
Post a Comment