@@ -14,24 +14,9 @@ type component<'props> = Jsx.component<'props>
14
14
15
15
external component : componentLike <'props , element > => component <'props > = "%identity"
16
16
17
- %%private (
18
- @val
19
- external propsWithKey : (@as (json ` {}` ) _ , 'props , {"key" : string }) => 'props = "Object.assign"
20
-
21
- @inline
22
- let addKeyProp = (~key : option <string >= ?, p : 'props ): 'props =>
23
- switch key {
24
- | Some (key ) => propsWithKey (p , {"key" : key })
25
- | None => p
26
- }
27
- )
28
-
29
17
@module ("react" )
30
18
external createElement : (component <'props >, 'props ) => element = "createElement"
31
19
32
- let createElementWithKey = (~key = ?, component , props ) =>
33
- createElement (component , addKeyProp (~key ?, props ))
34
-
35
20
@module ("react" )
36
21
external cloneElement : (element , 'props ) => element = "cloneElement"
37
22
@@ -42,9 +27,6 @@ external isValidElement: 'a => bool = "isValidElement"
42
27
external createElementVariadic : (component <'props >, 'props , array <element >) => element =
43
28
"createElement"
44
29
45
- let createElementVariadicWithKey = (~key = ?, component , props , elements ) =>
46
- createElementVariadic (component , addKeyProp (~key ?, props ), elements )
47
-
48
30
@module ("react/jsx-runtime" )
49
31
external jsx : (component <'props >, 'props ) => element = "jsx"
50
32
0 commit comments