Skip to content

Instantly share code, notes, and snippets.

@rusty-key
Created July 5, 2018 07:17
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save rusty-key/f0412e79006c36a9c8ceda22e7495b6a to your computer and use it in GitHub Desktop.
Save rusty-key/f0412e79006c36a9c8ceda22e7495b6a to your computer and use it in GitHub Desktop.
Reason HMR
[@bs.val] [@bs.scope ("module")]
external isHotEnabled : bool = "hot";
[@bs.val] [@bs.scope ("module", "hot")] external hotAccept : unit => unit = "accept";
ReactDOMRe.renderToElementWithId(<App />, "root");
if (isHotEnabled) {
hotAccept();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment