Skip to content

Implement React's jsx/jsxs Factory Changes #34547

Closed

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 of children)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Domain: JSX/TSXRelates to the JSX parser and emitterFix AvailableA PR has been opened for this issueIn DiscussionNot yet reached consensusNeeds ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions