-
Notifications
You must be signed in to change notification settings - Fork 791
Closed
Description
React-Hot-Loader: broken state detected, please import React-Hot-Loader before react-dom
When
This message would be displayed when ReactDOM.render
does not exists.
Reason
React-Dom
will import React-Hot-Loader
, which will import React-Dom
, which is already in the loading state, so it would return "nothing".
Fix
- Import
react-hot-loader
before. For example, prepend yourentry
withreact-hot-loader/patch
- Set
noRegister
option for webpack-loader, if you are using it to patchreact-dom
{
include: /node_modules\/react-dom/,
test: /\.jsx?$/,
use: {
loader: 'react-hot-loader/webpack',
options: {
noRegister: true,
}
},
}
See also
Metadata
Metadata
Assignees
Labels
No labels