esm-hmr
esm-hmr copied to clipboard
mobx
Wrapping components to mobx's 'observer' (that wrap them in React.memo) prevents hmr to work
"@snowpack/plugin-react-refresh": "^2.0.3",
"@snowpack/app-scripts-react": "^1.9.0",
"mobx": "^5.15.4",
"mobx-react": "^6.2.3",
"mobx-react-lite": "^2.0.7",
"snowpack": "^2.8.0",
Can you include steps that I could reproduce, including code snippets that I can add to a Snowpack app to see this failure in action?
@FredKSchott sure repo to reproduce: https://github.com/leeratyou/snowpack-mobx-issue
- start project
- phone/code any
- display to Home screen
- edit
src/pages/Home
- that triggers file change but not Home content
I am interested in this as well. Any examples on how to setup HMR with mobx/MST?
Something like this: https://github.com/mobxjs/mobx-state-tree/issues/372#issuecomment-336145224
Thanks!
@leeratyou Any news on that?