@@ -5,8 +5,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
55 let make ? key : (_ : string option) ~ lola () =
66 React. Upper_case_component
77 ( Stdlib. __FUNCTION__,
8- fun () ->
9- React. createElementWithKey ~ key : None " div" [] [ React. string lola ] )
8+ fun () -> React. createElement " div" [] [ React. string lola ] )
109 end
1110
1211 let react_component_with_props =
@@ -17,7 +16,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
1716 React. Upper_case_component
1817 ( Stdlib. __FUNCTION__,
1918 fun () ->
20- React. createElementWithKey ~ key : None " button"
19+ React. createElement " button"
2120 (Stdlib. List . filter_map Stdlib. Fun. id
2221 [
2322 Some (React. JSX. Ref (buttonRef : React. domRef));
@@ -34,7 +33,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
3433 ( Stdlib. __FUNCTION__,
3534 fun () ->
3635 let onClick event = Js. log event in
37- React. createElementWithKey ~ key : None " button"
36+ React. createElement " button"
3837 (Stdlib. List . filter_map Stdlib. Fun. id
3938 [
4039 Some (React. JSX. String (" name" , " name" , (name : string)));
@@ -54,7 +53,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
5453 React. Upper_case_component
5554 ( Stdlib. __FUNCTION__,
5655 fun () ->
57- React. createElementWithKey ~ key : None " div" []
56+ React. createElement " div" []
5857 [ Printf. sprintf " `name` is % s" name |> React. string ] )
5958 end
6059
@@ -66,22 +65,22 @@ We need to output ML syntax here, otherwise refmt could not parse it.
6665 React. Upper_case_component
6766 ( Stdlib. __FUNCTION__,
6867 fun () ->
69- React. createElementWithKey ~ key : None " html" []
68+ React. createElement " html" []
7069 [
71- React. createElementWithKey ~ key : None " head" []
70+ React. createElement " head" []
7271 [
73- React. createElementWithKey ~ key : None " title" []
72+ React. createElement " title" []
7473 [ React. string (" SSR React " ^ moreProps) ];
7574 ];
76- React. createElementWithKey ~ key : None " body" []
75+ React. createElement " body" []
7776 [
78- React. createElementWithKey ~ key : None " div"
77+ React. createElement " div"
7978 (Stdlib. List . filter_map Stdlib. Fun. id
8079 [
8180 Some (React. JSX. String (" id" , " id" , (" root" : string)));
8281 ])
8382 [ children ];
84- React. createElementWithKey ~ key : None " script"
83+ React. createElement " script"
8584 (Stdlib. List . filter_map Stdlib. Fun. id
8685 [
8786 Some
@@ -98,7 +97,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
9897 React. Upper_case_component
9998 ( Stdlib. __FUNCTION__,
10099 fun () ->
101- React. createElementWithKey ~ key : None " div"
100+ React. createElement " div"
102101 (Stdlib. List . filter_map Stdlib. Fun. id
103102 [
104103 Some
@@ -115,7 +114,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
115114 React. Upper_case_component
116115 ( Stdlib. __FUNCTION__,
117116 fun () ->
118- React. createElementWithKey ~ key : None " form"
117+ React. createElement " form"
119118 (Stdlib. List . filter_map Stdlib. Fun. id
120119 [
121120 Some (React. JSX. String (" method" , " method" , (" GET" : string)));
@@ -128,7 +127,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
128127 React. Upper_case_component
129128 ( Stdlib. __FUNCTION__,
130129 fun () ->
131- React. createElementWithKey ~ key : None " form"
130+ React. createElement " form"
132131 (Stdlib. List . filter_map Stdlib. Fun. id
133132 [
134133 (match
@@ -151,7 +150,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
151150 React. Upper_case_component
152151 ( Stdlib. __FUNCTION__,
153152 fun () ->
154- React. createElementWithKey ~ key : None " form"
153+ React. createElement " form"
155154 (Stdlib. List . filter_map Stdlib. Fun. id
156155 [
157156 (match
@@ -178,7 +177,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
178177 React. Upper_case_component
179178 ( Stdlib. __FUNCTION__,
180179 fun () ->
181- React. createElementWithKey ~ key : None " form"
180+ React. createElement " form"
182181 (Stdlib. List . filter_map Stdlib. Fun. id
183182 [
184183 (match
@@ -201,7 +200,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
201200 React. Upper_case_component
202201 ( Stdlib. __FUNCTION__,
203202 fun () ->
204- React. createElementWithKey ~ key : None " button"
203+ React. createElement " button"
205204 (Stdlib. List . filter_map Stdlib. Fun. id
206205 [
207206 (match
@@ -228,7 +227,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
228227 React. Upper_case_component
229228 ( Stdlib. __FUNCTION__,
230229 fun () ->
231- React. createElementWithKey ~ key : None " button"
230+ React. createElement " button"
232231 (Stdlib. List . filter_map Stdlib. Fun. id
233232 [
234233 (match
@@ -254,15 +253,14 @@ We need to output ML syntax here, otherwise refmt could not parse it.
254253 [ children ] )
255254 end
256255
257- let a =
258- Uppercase. make ~ children: (React. createElementWithKey ~ key : None " div" [] []) ()
256+ let a = Uppercase. make ~ children: (React. createElement " div" [] []) ()
259257
260258 module Async_component = struct
261259 let make ? key : (_ : string option) ~ children () =
262260 React. Async_component
263261 ( Stdlib. __FUNCTION__,
264262 fun () ->
265- React. createElementWithKey ~ key : None " div"
263+ React. createElement " div"
266264 (Stdlib. List . filter_map Stdlib. Fun. id
267265 [
268266 Some
@@ -272,10 +270,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
272270 [ children ] )
273271 end
274272
275- let a =
276- Async_component. make
277- ~ children: (React. createElementWithKey ~ key : None " div" [] [])
278- ()
273+ let a = Async_component. make ~ children: (React. createElement " div" [] []) ()
279274
280275 module Sequence = struct
281276 let make ? key : (_ : string option) ~ lola () =
@@ -286,8 +281,7 @@ We need to output ML syntax here, otherwise refmt could not parse it.
286281 React. useEffect (fun () ->
287282 setState lola;
288283 None);
289- React. createElementWithKey ~ key : None " div" [] [ React. string state ]
290- )
284+ React. createElement " div" [] [ React. string state ] )
291285 end
292286
293287 module Use_context = struct
@@ -296,6 +290,5 @@ We need to output ML syntax here, otherwise refmt could not parse it.
296290 ( Stdlib. __FUNCTION__,
297291 fun () ->
298292 let captured = React. useContext Context. value in
299- React. createElementWithKey ~ key : None " div" []
300- [ React. string captured ] )
293+ React. createElement " div" [] [ React. string captured ] )
301294 end
0 commit comments