-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot load images from placeholder service after adding react-hot-loader 3.0.0-beta.2 #423
Comments
Please update to |
warning.js?8a56:36 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Image component still occurs after I installed |
It's compatible with Node 6. I'm not sure what's going on there, I've been working with |
That's because beta/pre-release package versions aren't installed by default. |
I have put my react-hot-loader config and Image component code into a gist here and do a hard reset to remove react-hot-loader. I think I should wait before reintroducing the project into my build. Thanks. |
OK, actually this issue looks like it could also be an instance of #313. To fix you'll need to add |
I have |
At least ES2015 classes, see the issue I linked to above. |
@calesce
{
"presets":[
"react",
[
"env",
{
"targets":{
"chrome":52,
"node":true
}
}
]
],
"env": {
"development": {
"plugins":[
"transform-es2015-classes",
"react-hot-loader/babel"
]
},
"production": {
"presets": ["babili"]
}
},
"plugins":[
"transform-class-properties",
["transform-object-rest-spread", {
"useBuiltIns":true
}
]
]
} Webpack hmr config:: const hmr = {
entry: [
'react-hot-loader/patch',
`${APP_PATH}/index.js`,
],
devServer: {
inline: true,
hot: true,
host: process.env.HOST || '0.0.0.0',
port: process.env.PORT || 3000,
stats: 'errors-only',
historyApiFallback: true,
contentBase: BUILD_PATH,
watchOptions: {
aggregateTimeout: 300,
poll: 1000,
},
},
plugins: [
new DefinePlugin({
NODE_ENV: JSON.stringify('development'),
}),
new HotModuleReplacementPlugin(),
new NpmInstallPlugin({
dev(module) {
return (/(^babel-?.*|.*-plugin$|.*-loader)/).test(module);
},
}),
],
}; Main component:
This is working correctly for me. |
There is an error in my console that looks like this:
This is my Image component:
It is used by the LoremPixel to load a placeholder image from
lorempixel
:This is my react-hot-loader boilerplate:
I am using the
webpack-dev-server
withreact-hot-loader/babel
added to the.babelrc
and thereact-hot-loader/patch
in theentry
of the webpack config.The text was updated successfully, but these errors were encountered: