File tree Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Expand file tree Collapse file tree 2 files changed +3
-22
lines changed Original file line number Diff line number Diff line change 11/**
2- This module is kept for ReScript react-jsx <= v3 compatibility
2+ This module is kept for ReScript react-jsx v3 compatibility
33We removed all functionality that is not needed for JSX usage
44**/
55
@@ -19,23 +19,3 @@ external createDOMElementVariadic: (
1919@bs. splice @bs. val @bs. module ("react" )
2020external createElement : (string , ~props : props = ?, array <React .element >) => React .element =
2121 "createElement"
22-
23- /* Only wanna expose createElementVariadic here. Don't wanna write an interface file */
24- include (
25- /* Use varargs to avoid the ReactJS warning for duplicate keys in children */
26- {
27- @bs. val @bs. module ("react" )
28- external createElementInternalHack : 'a = "createElement"
29-
30- @bs. send
31- external apply : ('theFunction , 'theContext , 'arguments ) => 'returnTypeOfTheFunction = "apply"
32-
33- let createElementVariadic = (domClassName , ~props = ?, children ) => {
34- let variadicArguments =
35- [Obj .magic (domClassName ), Obj .magic (props )] |> Js .Array .concat (children )
36- createElementInternalHack -> apply (Js .Nullable .null , variadicArguments )
37- }
38- }: {
39- let createElementVariadic : (string , ~props : props = ?, array <React .element >) => React .element
40- }
41- )
Original file line number Diff line number Diff line change 11/**
2- This module is only kept for react-jsx <= v3 compatibility
2+ This module is kept for ReScript react-jsx v3 compatibility
33We removed all functionality that is not needed for JSX usage
44**/
5+
56@bs. module ("react" ) external fragment : 'a = "Fragment"
You can’t perform that action at this time.
0 commit comments