Created
May 10, 2017 12:21
-
-
Save rlucha/b84a77a6cecf37bb608617413c85c5c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* from https://github.com/reasonml/reason-react/blob/master/src/reactDOMRe.re */ | |
| /* First time reading an OCaml/Reason/BuckleScript file? */ | |
| /* `external` is the foreign function call in OCaml. */ | |
| /* here we're saying `I guarantee that on the JS side, we have a `render` function in the module "react-dom" | |
| that takes in a reactElement, a dom element, and returns unit (nothing) */ | |
| /* It's like `let`, except you're pointing the implementation to the JS side. The compiler will inline these | |
| calls and add the appropriate `require("react-dom")` in the file calling this `render` */ | |
| external render : ReactRe.reactElement => Dom.element => unit = | |
| "render" [@@bs.val] [@@bs.module "react-dom"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment