mobx
leeratyou opened this issue · comments
boris veligorya commented
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",
Fred K. Schott commented
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?
boris veligorya commented
@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
Jozef Mikuláš commented
I am interested in this as well.
Any examples on how to setup HMR with mobx/MST?
Something like this: mobxjs/mobx-state-tree#372 (comment)
Thanks!
Alexander Raihelgaus commented
@leeratyou Any news on that?