aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
16.09k stars 561 forks source link

feat: 3.0 compiler #884

Closed lxsmnsyc closed 6 months ago

lxsmnsyc commented 6 months ago

🚧 UNDER CONSTRUCTION 🚧

Goals

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
million-kitchen-sink ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 10:12pm
sink ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 10:12pm
tobySolutions commented 6 months ago

Amazing stuff!!! This is insane @lxsmnsyc!

lxsmnsyc commented 6 months ago

One big change is that block components no longer compile into block but into compiledBlock. compiledBlock manages both hoisted templates and portals via statically analyzing how much of the elements needs to be rendered into a portal.

Another thing that this unlocks is that you can now do branching statements inside block properly.

tobySolutions commented 6 months ago

One big change is that block components no longer compile into block but into compiledBlock. compiledBlock manages both hoisted templates and portals via statically analyzing how much of the elements needs to be rendered into a portal.

Another thing that this unlocks is that you can now do branching statements inside block properly.

Oh damn! That sounds awesome; and by "branching statements" you mean conditionals, yes?

lxsmnsyc commented 6 months ago

@tobySolutions yes. I believe the previous block compilation didn't support this, because of the compiler output for portals.

tobySolutions commented 6 months ago

@tobySolutions yes. I believe the previous block compilation didn't support this, because of the compiler output for portals.

Yes, you are right! Amazing work Alex, this is huge progress!

lxsmnsyc commented 6 months ago

Current issues (as per kitchen-sink), checked = fixed:

Changes:

Reworks left:

Tasks left:

lxsmnsyc commented 6 months ago
lxsmnsyc commented 6 months ago

@Aslemammad @aidenybai I'm closing this PR down, but not the branch, so feel free to backup things that you wanted.