Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Idea: inline JSX calls #32

Open
romgrk opened this issue Mar 19, 2024 · 2 comments
Open

Idea: inline JSX calls #32

romgrk opened this issue Mar 19, 2024 · 2 comments

Comments

@romgrk
Copy link

romgrk commented Mar 19, 2024

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.

@mohebifar
Copy link
Owner

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.

@romgrk
Copy link
Author

romgrk commented Mar 21, 2024

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants