Guest User

Untitled

a guest
May 21st, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. ReactDOMRe.renderToElementWithId(<App />, "root");
  2.  
  3. type parcelModule;
  4. type hot;
  5. [@bs.val] external parcelModule : parcelModule = "module";
  6. [@bs.get] external hot : parcelModule => Js.nullable(hot) = "hot";
  7. [@bs.send.pipe : hot] external accept : unit => unit = "accept";
  8.  
  9. switch (Js.Nullable.toOption(parcelModule |> hot)) {
  10. | Some(h) => h |> accept()
  11. | _ => Js.log("We are not hot")
  12. };
Add Comment
Please, Sign In to add comment