Implement React's jsx
/jsxs
Factory Changes · Issue #34547 · microsoft/TypeScript (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
Major changes for us:
- JSX
children
are always installed as an array on the props object - not as trailing arguments. key
will be passed separately from other props (in place ofchildren
)
Also of note:
defaultProps
will be deprecated on function components- Spreading
key
will be deprecated - String
refs
will be deprecated
We might need new jsx
flags, or jsxFactory
flags, or something similar. Checking might need to be changed to reflect this as well depending on if/how we resolve createElement
calls.