Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit a4a5c37

Browse files
committed
fix according to ReactPPX4Support fun
1 parent 28eb48e commit a4a5c37

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

cli/reactjs_jsx_v4.ml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,6 @@ let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc
401401
let makeID =
402402
Exp.ident ~loc:callExprLoc {txt = ident ~suffix:"make"; loc = callExprLoc}
403403
in
404-
let makeReactCreateElement name =
405-
Exp.ident {txt = Ldot (Lident "React", name); loc = Location.none}
406-
in
407404
match config.mode with
408405
(* The new jsx transform *)
409406
| "automatic" ->
@@ -433,12 +430,7 @@ let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc
433430
loc = Location.none;
434431
txt = Ldot (Lident "ReactPPX4Support", "createElementWithKey");
435432
})
436-
[
437-
key;
438-
(nolabel, makeReactCreateElement "createElement");
439-
(nolabel, makeID);
440-
(nolabel, props);
441-
]
433+
[key; (nolabel, makeID); (nolabel, props)]
442434
| None, [] ->
443435
Exp.apply ~attrs
444436
(Exp.ident
@@ -452,13 +444,7 @@ let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc
452444
txt =
453445
Ldot (Lident "ReactPPX4Support", "createElementVariadicWithKey");
454446
})
455-
[
456-
key;
457-
(nolabel, makeReactCreateElement "createElementVariadic");
458-
(nolabel, makeID);
459-
(nolabel, props);
460-
(nolabel, children);
461-
]
447+
[key; (nolabel, makeID); (nolabel, props); (nolabel, children)]
462448
| Some children, [] ->
463449
Exp.apply ~attrs
464450
(Exp.ident

0 commit comments

Comments
 (0)