File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
module React.Basic.Hooks
2
2
( component
3
+ , unsafeComponent
3
4
, memo
4
5
, UseState
5
6
, useState
@@ -54,12 +55,23 @@ import Unsafe.Reference (unsafeRefEq)
54
55
-- | lifecycles or render functions.
55
56
component ::
56
57
forall hooks props .
58
+ Lacks " children" props =>
57
59
Lacks " key" props =>
58
60
Lacks " ref" props =>
59
61
String ->
60
62
({ | props } -> Render Unit hooks JSX ) ->
61
63
Effect (ReactComponent { | props } )
62
- component name renderFn =
64
+ component = unsafeComponent
65
+
66
+ -- | Identical to `component`, but allows the unsafe use of the `children` prop.
67
+ unsafeComponent ::
68
+ forall hooks props .
69
+ Lacks " key" props =>
70
+ Lacks " ref" props =>
71
+ String ->
72
+ ({ | props } -> Render Unit hooks JSX ) ->
73
+ Effect (ReactComponent { | props } )
74
+ unsafeComponent name renderFn =
63
75
let
64
76
c =
65
77
unsafeReactFunctionComponent
You can’t perform that action at this time.
0 commit comments