Allow non-identifiers to be used for JSXFragmentFactory #41400
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Search Terms
JSX factory expression identifier string JSXFragmentFactory
Related Issues
#20469
#38720
Suggestion
Allow non-identifiers to be used as the JSXFragmentFactory. Currently, attempting to use a non-identifier like the empty string results in the following error:
My config:
Use Cases
My JSX framework defines the
Fragment
tag as the empty string. Babel’s JSX support allows non-identifiers to be used as the JSXFragmentFactory so I wonder why we can’t do the same in TypeScript.Using an identifier is a little more awkward.
Examples
With the
jsxFactory
set tocreateElement
and thejsxFragmentFactory
set to the empty string, emitted code might look like the following.Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: