Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting started #40

Open
ScottAwesome opened this issue Mar 18, 2020 · 1 comment
Open

Getting started #40

ScottAwesome opened this issue Mar 18, 2020 · 1 comment

Comments

@ScottAwesome
Copy link

ScottAwesome commented Mar 18, 2020

Hello!

I was and still am very intrigued by this repository.

I was wondering what you have given to such thoughts such as it’s potential future, it’s roadmap (ish?), and maybe anything you can speak to about usage? Like react compatibility.

I think given it’s size it wouldn’t be unreasonable to see this as a Preact alternative?

Also wondering if your looking to take on contributions

@jridgewell
Copy link
Owner

Hi!

This repo is actually 2 projects. The first, babel-plugin-transform-jsx2, is actually a complete transform ready to be used to create "static template" JSX trees. However, there are currently no runtime libraries that can handle a static template.

That's the goal of the second project, jsx2 (confusingly named, I know). The jsx2 renderer is meant to be a prototype to demonstrate the performance gains due to static template trees. I predict faster JS parsing (the output code is smaller and much easier to parse), faster initial renders (we no longer need to call React.createElement which is polymorphic and very slow), and faster rerendering (static templates eliminate GC pressure).

So the goal isn't really React compatibility, or even a replacement Preact implementation. The goal is to get these established projects to use a much better JSX format.

Also wondering if your looking to take on contributions

I'm always happy for help, and that would probably inspire me to continue working on it. Right now, the "normal" JSX rendering is done, and we're able to actually render into DOM. All that's left is implementing the static template JSX rendering (which should be easy), and implementing/optimizing the rerendering when using static templates.

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

No branches or pull requests

2 participants