What you are reporting: Styling is lost on update using [email protected] works in 4.8.8
What you think should happen:
For styling to still be applied on update.
What actually happens:
All styling is removed.
React Hot Loader version: 4.9.0
Run these commands in the project folder and fill in their results:
node -v: 12.2.0npm -v: 6.9.0Then, specify:
https://github.com/andrew-w-ross/react-hot-loader-regression
Instructions on how to reproduce the issue are in the project.
Temporal workaround - disable hooks reload
import { setConfig } from 'react-hot-loader'
setConfig({
reloadHooks: false
})
Look like this is a specific Material UI behaviour which clashes with the assumptions I've made:
useEffectuseSynchronousEffect, which manually __applies__ the effect, and uses useEffect to remove it.Hopefully this is a single, and quite unusual point of failure.
@oliviertassinari - 馃檹
Thanks for sharing
One more note: If you use the gatsby example from the MUI project: You need to paste
import { setConfig } from 'react-hot-loader'
setConfig({
reloadHooks: false
})
on top of the function definition of your root layout i.e. the top layout of the plugin.
MUI going to solve it _tomorrow_.
It's fixed in https://github.com/mui-org/material-ui/pull/16195 and will be soon released in Material-UI v4.1.1.
@oliviertassinari @theKashey You guys rock, thanks.
And it's done!
Most helpful comment
Temporal workaround - disable hooks reload