Closed
Description
On the current master, createLeafElement
has the signature:
-- | Create an element from a React class that does not require children.
createLeafElement :: forall required given.
ReactPropFields required given =>
ReactClass { | required } ->
{ | given } ->
ReactElement
I used to be able to use Union
for encoding react classes with optional prop fields defined such as:
foreign import fooClass :: forall props. ReactClass props
foo :: forall o t
. Union o t ( title :: String )
=> {|o}
-> ReactElement
foo = createLeafElement fooClass
Wherein I can call foo {}
or foo {title: "hello"}
. But it seems the new ReactPropFields
constraint now prevents me from doing this. Any suggested way getting around this?
Metadata
Metadata
Assignees
Labels
No labels