歷史2.0.0 RC2陣營終極版歷史錯誤 - 類型錯誤:(0,_history2.default)不是一個函數
其次this example逐字記錄和:
import { createHistory } from 'history';
import { applyMiddleware, compose, createStore } from 'redux';
import { syncHistory } from 'react-router-redux';
const history = createHistory(); //<-- ***THIS LINE IS FAILING!!!***
const routingMiddleware = syncHistory(history);
...創造歷史失敗與TypeError: (0 , _history2.default) is not a function
。我試過沒有{},並嘗試從createBrowserHistory中導入它,並得到相同的結果。我錯過了什麼?我打開了一個但反對歷史,但他們說我們不看看錯誤,所以請張貼在計算器上。