0
問題: 最初にルートURLに移動すると、正しいページがレンダリングされます。ナビゲートもうまく動作します。私は、次のエラーでアプリがクラッシュrefresh
を打ったときしかし、:リアルーターを使用しているときにハンドルページがリフレッシュされます
instrument.js:112 Uncaught TypeError: Cannot read property 'length' of undefined
をこれが
instrument.js:112
内の関数です。
computedStates
は
undefined
です。
/**
* Runs the reducer on invalidated actions to get a fresh computation log.
*/
function recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds) {
// Optimization: exit early and return the same reference
// if we know nothing could have changed.
if (minInvalidatedStateIndex >= computedStates.length && computedStates.length === stagedActionIds.length) {
return computedStates;
}
localStorage.clear()
を実行してページを更新すると、再びアプリが戻ってきます。問題の責任かもしれない
パッケージ:
"react-router": "^2.0.0",
"react-router-redux": "^4.0.0",
"redux-localstorage": "^0.4.0",
ルーターを反応させる際に使用しているページが更新されます処理するための最良の方法は何ですか?