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

Commit 9bba115

Browse files
committed
restore React.createElement in application site
1 parent d2e4dc6 commit 9bba115

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/reactjs_jsx_ppx_v3.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,12 @@ let jsxMapper () =
330330
match !childrenArg with
331331
| None ->
332332
Exp.apply ~loc ~attrs
333-
(Exp.ident ~loc { txt = ident; loc })
334-
[ (nolabel, props) ]
333+
(Exp.ident ~loc { loc; txt = Ldot (Lident "React", "createElement") })
334+
[ (nolabel, Exp.ident ~loc { txt = ident; loc }); (nolabel, props) ]
335335
| Some children ->
336336
Exp.apply ~loc ~attrs
337-
(Exp.ident ~loc { txt = ident; loc })
338-
[ (nolabel, props); (nolabel, children) ]
337+
(Exp.ident ~loc { loc; txt = Ldot (Lident "React", "createElementVariadic") })
338+
[ (nolabel, Exp.ident ~loc { txt = ident; loc }); (nolabel, props); (nolabel, children) ]
339339
[@@raises Invalid_argument]
340340
in
341341

0 commit comments

Comments
 (0)