aidenybai / million

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

feat(experimental): remove slots for blocks #948

Closed Aslemammad closed 4 months ago

Aslemammad commented 5 months ago

The only way to resolve this is to divide and conquer it! After 3 implementations, all of them failed and I don't think we can deal with this easily.

I decided to divide this feature/breaking-change into multiple parts and add them with the experimental_options.noSlot flag or the experimental_noSlot prop.

In this PR, I remove slots from blocks only and it does not even support siblings yet (or maybe never) but that's a good start I think.

We ship this to the users with those flags and see their reactions and responses!

The way to try this is to do this:

import { experimental_options }} from 'million/experimental'

experimental_options.noSlot = true;

// or 

block(() => ..., { experimental_noSlot: true })

Now I kinda understand why React is doing what it's doing with the experimental releases.

tobySolutions commented 5 months ago

Hmm, I like this idea 🤔🤔. I think it's a good start.

vercel[bot] commented 5 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 Feb 19, 2024 6:26am
sink ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 6:26am