Convert Outlet
to use a render prop to describe the output
#60
Labels
breaking change
Indicates the issue/pull request would result in a breaking change
enhancement
New feature or request
next
Issue/Pull Request for the next major version
Enhancement
An
Outlet
is a basic higher order component which accepts one or more widgets on creation of the outlet.The current implementation is problematic for typings when there are multiple widgets specified as the
Outlet
's properties becomes a union type of all the widget's properties passed to theOutlet
. This is not correct, as you may need to pass different values for the same property depending on the match type scenario. Another side affect means that widgets could receive extra properties that were intended for a different widget.There are at least a couple of potential options:
Option 1
Move from a HOC to a component that accepts a render property to describe the outlets output. This will allow consumers to explicitly pass the properties to each of the widgets and give more control to the consumer to create customised logic on which widgets to display.
Options 2
Keep with a HOC to a component but one that accepts a render function to describe the outlets output. This will also allow consumers to explicitly pass the properties to each of the widgets and give more control to the consumer to create customised logic on which widgets to display.
The text was updated successfully, but these errors were encountered: