pasmomusic/reason-react

Live reload

Opened this issue · 0 comments

We can use Dynlink to perform hot reloading. It's quite straightforward given that it only works if the interface of modules stays the same. If Dynlink throws we could resort to manual unloading and loading of a dylib from C.

There are three things that need to be done

  • Rerender function - given a React.RenderedElement.t run render again but keep all existing instances (it'd have to generate an UpdateLog.t)
  • Loading using dynlink
  • If it fails (throws) unload and load the dynamic library with ocaml code.