Created
May 10, 2017 12:21
-
-
Save rlucha/6b8c21cdd65ca5c2d32aa39bdc6502cf 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
| /* 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