-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
PR WelcomeStatus: AcceptedThe issue has been acceptedThe issue has been acceptedType: FeatureNew featuresNew features
Description
Problem Description
Sometimes APIs will type their inputs as JSX.Element, in which case, you’ll need to pass in an empty fragment instead of null.
<Foo bar={<></>}/>
Or the return type of the component is typed as JSX.Element so you return <></> while loading
Alternative Solutions
Migrating away from <></> is too much work
Feature Details
allowEmptyFragment: boolean = false
Examples
allowEmptyFragment: true
And then you could use <></>
Evaluation Checklist
- I have had problems that this feature would solve
- I could not find a way to solve the problem with existing features or workarounds
- I have thought very hard about potential edge cases and downsides, and they are acceptable
- I think the feature is well-defined and would provide clear value to users
jdufresne
Metadata
Metadata
Assignees
Labels
PR WelcomeStatus: AcceptedThe issue has been acceptedThe issue has been acceptedType: FeatureNew featuresNew features