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

Live reload #4

Open
3 tasks
wokalski opened this issue Jan 10, 2018 · 0 comments
Open
3 tasks

Live reload #4

wokalski opened this issue Jan 10, 2018 · 0 comments

Comments

@wokalski
Copy link

wokalski commented Jan 10, 2018

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.
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

1 participant