Closed
Description
! THIS IS NOT YOUR COMPONENT !
! THIS IS REACT-HOT-LOADER !
And you are probably looking for a function component of yours
It's hidden, but there is a way to fix this - just reconfigure your application a bit
You might see this in your code, especially if you clicked "Show Component Source" in the React Dev Tools.
You were looking for some component, and got ProxyFacade
- that's how React-Hot-Loader works - it's wrapping everything with Proxies.
And you can fix it!
To fix this problem you need "react-🔥-patch", and there are tree ways how to apply it:
Webpack loader
Use a webpack-plugin to land a patch. That's the safest way.
// would only land a "hot-patch" to react-dom
{
test: /\.js$/,
include: /node_modules\/react-dom/,
use: ['react-hot-loader/webpack']
},
hot-loader/react-dom alias
Use a hot-loader/react-dom with prelanded patch. See hot-loader repo for the instalation details.
// webpack.conf
...
resolve: {
alias: {
'react-dom': '@hot-loader/react-dom'
}
}
...
hot-loader/react-dom yarn override
Just yarn add react-dom@npm:@hot-loader/react-dom
, but only for yarn
package manager.
Metadata
Metadata
Assignees
Labels
No labels