Skip to content
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

mobx #17

Open
leeratyou opened this issue Aug 18, 2020 · 4 comments
Open

mobx #17

leeratyou opened this issue Aug 18, 2020 · 4 comments

Comments

@leeratyou
Copy link

leeratyou commented Aug 18, 2020

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",
@FredKSchott
Copy link
Owner

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?

@leeratyou
Copy link
Author

leeratyou commented Aug 20, 2020

@FredKSchott
sure
repo to reproduce: https://github.com/leeratyou/snowpack-mobx-issue

  1. start project
  2. phone/code any
  3. display to Home screen
  4. edit src/pages/Home
  5. that triggers file change but not Home content

@dodas
Copy link

dodas commented Nov 26, 2020

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!

@ar7casper
Copy link

@leeratyou Any news on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants