Skip to content

Use the new JSX tranform #9289

@jonkoops

Description

@jonkoops

The React team announced a new way to transform JSX, which yields a couple of benefits:

  • With the new transform, you can use JSX without importing React.
  • Depending on your setup, its compiled output may slightly improve the bundle size.
  • It will enable future improvements that reduce the number of concepts you need to learn React.
  • There are some performance improvements and simplifications that React.createElement does not allow.

This will also be required for future versions of React that will ship with the ECMAScript module syntax:

In addition to cleaning up unused imports, this will also help you prepare for a future major version of React (not React 17) which will support ES Modules and not have a default export.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions