Last active
August 25, 2019 10:51
-
-
Save Et7f3/aeb0c6ef9768e1aa6bdb59a04fbe7efb to your computer and use it in GitHub Desktop.
Try compare ReactDOMRe.createElement vs ReactDOMRe.createElementVariadic
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
// Generated by BUCKLESCRIPT VERSION 5.0.4, PLEASE EDIT WITH CARE | |
'use strict'; | |
var Block = require("./stdlib/block.js"); | |
var Curry = require("./stdlib/curry.js"); | |
var React = require("react"); | |
var ReactDOMRe = require("./stdlib/reactDOMRe.js"); | |
var a = React.createElement("div", undefined, "e"); | |
function b(children) { | |
// https://github.com/BuckleScript/bucklescript/blob/master/lib/js/caml_splice_call.js#L4 | |
return Block.spliceApply(React.createElement, [ | |
"div", | |
undefined, | |
children | |
]); | |
// === | |
return React.createElement.apply(null, ["div", undefined].concat(children)); | |
} | |
var c = React.createElement("div", undefined, "e"); | |
function d(children) { | |
return Block.spliceApply(React.createElement, [ | |
"div", | |
undefined, | |
children | |
]); | |
// === | |
return React.createElement.apply(null, ["div", undefined].concat(children)); | |
} | |
var e = Curry._3(ReactDOMRe.createElementVariadic, "div", undefined, /* array */["e"]); | |
function f(children) { | |
// https://github.com/reasonml/reason-react/blob/master/lib/js/src/ReactDOMRe.js#L61 | |
return Curry._3(ReactDOMRe.createElementVariadic, "div", undefined, children); | |
// === | |
return React.createElement.apply(null, ["div", undefined].concat(children)); | |
} | |
exports.a = a; | |
exports.b = b; | |
exports.c = c; | |
exports.d = d; | |
exports.e = e; | |
exports.f = f; | |
/* a Not a pure module */ |
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
let a = ReactDOMRe.createDOMElementVariadic("div", [|React.string("e")|]); | |
let b = children => ReactDOMRe.createDOMElementVariadic("div", children); | |
let c = ReactDOMRe.createElement("div", [|React.string("e")|]); | |
let d = children => ReactDOMRe.createElement("div", children); | |
let e = ReactDOMRe.createElementVariadic("div", [|React.string("e")|]); | |
let f = children => ReactDOMRe.createElementVariadic("div", children); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment