File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11module React.Basic.Hooks
22 ( component
3+ , unsafeComponent
34 , memo
45 , UseState
56 , useState
@@ -54,12 +55,23 @@ import Unsafe.Reference (unsafeRefEq)
5455-- | lifecycles or render functions.
5556component ::
5657 forall hooks props .
58+ Lacks " children" props =>
5759 Lacks " key" props =>
5860 Lacks " ref" props =>
5961 String ->
6062 ({ | props } -> Render Unit hooks JSX ) ->
6163 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 =
6375 let
6476 c =
6577 unsafeReactFunctionComponent
You can’t perform that action at this time.
0 commit comments