Macil / ud

Utilities for updating code live with hot module replacement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with mobx-react

steelbrain opened this issue · comments

Hi @agentme

You've got an amazing package, it works as advertised out of the box. But unfortunately I am unable to use it in my application that uses mobx-react.

To reproduce the bug, just wrap any React component in react-mobx's observer.
The buggy behavior that HMR does nothing at all

I'm using ud v3.1.0 and mobx-react v 3.5.8

If you use ud with React components, then the components won't know to re-render themselves when a code update happens. Does ud work any differently with react-mobx than it does with plain components? I'd expect it not to be a great fit with or without mobx. I would recommend using https://github.com/gaearon/react-transform-hmr (or whatever has superseded it; react-transform-hmr has still been working well for me. I haven't looked into whatever's newer yet).