2017-03-17 6 views
1

以下に示すように、REACTでROUTERを定義しますが、依存関係が正しく追加されてもうまく機能しません。react-router hashHistory Uncaught TypeError:未定義のプロパティの場所を読み取ることができません

私を助ける人はいますか?

Error screen shot

Warning: Failed prop type: The prop `history` is marked as required in `Router`, but its value is `undefined`." 

bundle.js:115641 Uncaught TypeError: Cannot read property 'location' of undefined at new Router 
+0

'react-router'のどのバージョンですか? – agriboz

答えて

0

あなたはそれが輸出されます方法を見て、フォルダ import hashHistory from 'react-router/lib/hashHistory'; または import { hashHistory } from 'react-router/lib/hashHistory';から直接hashHistoryインポートすることができます。

関連する問題