With React 17 a new JSX Transform was introduced that allows developers to write JSX without importing React and potentially reduces bundle size (depending on existing setup).
There's more info on it here: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html and a guide how to upgrade babel configuration here: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#manual-babel-setup
Hi Goran,
This idea/feature is shipped with Engine 3.2, currently in Staging and will be in production this week. See the latest Engine release notes in ALC.
Let us know if you have any feedback on this.
Hi Goran,
Thanks for submitting this idea. We would like to add the support to babel to auto-import react that will remove the requirement of importing react in JSX files. However, it will not reduce the bundle size as fusion will bring in react for all JSX output types.
We will review and plan this in upcoming Engine releases.