react-unforget icon indicating copy to clipboard operation
react-unforget copied to clipboard

Idea: inline JSX calls

Open romgrk opened this issue 1 year ago • 2 comments

On top of all the nice optimizations done here, I think inlining JSX calls would fit nicely as a feature of this project. I've created a proof-of-concept here: https://github.com/romgrk/babel-plugin-fast-jsx, feel free to pick up anything you want from there.

romgrk avatar Mar 19 '24 06:03 romgrk

This is so cool and thanks for sharing. I'll think about how it can fit into this project. I believe they should remain as separate babel plugins, but it can be an extension to the unforget toolchain under the @react-unforget npm scope.

mohebifar avatar Mar 21 '24 02:03 mohebifar

Sure, feel free to use it or not as you wish, it's released to the public domain. I unfortunately can't use either on the projects I'm working on at the moment, but if I was building the kind of stuff that benefits from unforget I'd definitely be interested in the JSX transform as well. For some cases that are mount-heavy (mounts more often that re-renders), the JSX calls do add up to a significant amount.

Sidenote but it feels so great to be able to compile React performance cliffs away. And it feels like with a few strategic breaking changes, React plus a compiler could get near SolidJS level performance.

romgrk avatar Mar 21 '24 07:03 romgrk