I use React with Snowpack and the react-refresh plugin.
After a change, the snowpack dev server recompiles correctly and the browser receives an HMR update signal - but the content is not reloaded, the changes are only visible after manual reloading of the page.
I have tested with Firefox, Chrome and Brave.
According to the documentation you don't have to configure anything else than to include the plugin.
Does anyone have an idea? Would be very grateful!
Is your state management mobx?
If mobx is used, the component is optimized for memory by the observer, so the mobx state management must be updated to render.
In other words, the observer()
has to React.memo applied, and it is rendered again only when a state change occurs.
So if you use useObserver(() => {})
it will work