0
Reactアプリケーションでホットリロードを実行しようとしていますが、このエラーをデバッグする方法がわかりません。モジュールを最新の状態に更新できませんでした
マイアプリケーションインデックスは次のようになります。
import React from 'react'
import ReactDOM from 'react-dom'
import Routes from 'routes/index'
import { browserHistory } from 'react-router'
import syncHistoryWithStore from 'modules/routing/sync'
function createStore (browserHistory) {
let factory = require('./modules/store')
const store = factory.createStore(browserHistory)
if (module.hot) {
module.hot.accept('./modules/store',() => {
const nextFactory = require('./modules/store')
nextFactory.hydrateStore(store, factory.dehydrateStore(store))
factory = nextFactory
})
}
return store
}
const store = createStore(browserHistory)
const history = syncHistoryWithStore(browserHistory, store, {
selectLocationState: state => state.routing,
adjustUrlOnReplay: true
})
ReactDOM.render(
<Routes history={history} store={store} />,
document.getElementById('root')
)
私が反応するコンポーネントのいずれかを変更しようとするとエラーが発生しました。これらのアップデートはroutes/index
パスを経由します。しかし、なぜ私がides、作品、鉱山を取ったreact-redux-universal-hot-exampleは、理解していないのですか?
hot.accept
ので、私はかなりのリロードが任意の提案をコンポーネントが動作しますが、彼らはただやる...
反応してしまったか理解していないを持っていることがわかります
またはアイデアをどのようにデバッグする?