framer / motion

Open source, production-ready animation and gesture library for React
https://framer.com/motion
MIT License
22.27k stars 733 forks source link

feat: use modern jsx transform #2619

Closed kurtextrem closed 1 month ago

kurtextrem commented 1 month ago

This PR updates the jsx transform to the one introduced with React 17: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html

Starting with React 19, there will be a warning when using the old one (see https://github.com/facebook/react/pull/28781), plus the new transform gives a nice speed-bump with React 19: https://github.com/facebook/react/pull/28781

I've also run npx react-codemod update-react-imports . to update / remove imports where not needed. I've split those into two commits so that the config changes and the autofixes can be looked at separately.

mattgperry commented 1 month ago

Great, thanks for this!