million icon indicating copy to clipboard operation
million copied to clipboard

feat: create a webpack plugin that automatic add the blocks

Open aralroca opened this issue 1 year ago • 5 comments

It's great that it's just adding a hoc in the components, but maybe we could even make it so that developers don't have to do anything extra other than add a plugin and it automatically adds these blocks in all components. What do you think? If you like the idea I would like to help in its development

aralroca avatar Jun 10 '23 22:06 aralroca

It's great that it's just adding a hoc in the components, but maybe we could even make it so that developers don't have to do anything extra other than add a plugin and it automatically adds these blocks in all components. What do you think? If you like the idea I would like to help in its development

Hmm, I like the sound of your idea, can you like explain a use-case for me? Cos, what I'm getting now is that you want block() to be imported automatically right?

tobySolutions avatar Jun 10 '23 22:06 tobySolutions

@aralroca please correct me if I'm wrong, but I'm thinking of a cmd that can be called like a linter, going into each file, importing, and applying the block wrapper

itsjayway avatar Jun 11 '23 01:06 itsjayway

This is something we're going to converge to, but we have a lot of work to do before then: stability of the project, bugs, and removing the current limitations. We also need to make it future proof (how it works in a RSC, React Forget, Offscreen Rendering) world

aidenybai avatar Jun 11 '23 02:06 aidenybai

Perhaps I commented too quickly yesterday without know a lot of Million yet. If to use the new virtual block you have to make all components have the block, then it would make sense to me.

Although now I doubt that it is really so, please correct me if I'm wrong, after thinking a little I understand that if you wrap the parent components that are on top of the pages and the children would use the new virtual dom, or have I misunderstood? If so, then it's not that much work for the developer either.

To be honest, I saw yesterday the existence of this library and I got excited and I haven't tried it yet.

aralroca avatar Jun 11 '23 07:06 aralroca

Perhaps I commented too quickly yesterday without know a lot of Million yet. If to use the new virtual block you have to make all components have the block, then it would make sense to me.

Although now I doubt that it is really so, please correct me if I'm wrong, after thinking a little I understand that if you wrap the parent components that are on top of the pages and the children would use the new virtual dom, or have I misunderstood? If so, then it's not that much work for the developer either.

To be honest, I saw yesterday the existence of this library and I got excited and I haven't tried it yet.

Yeah, a good question Aralroca! Well, as you might have heard, the library isn't a silver bullet, as you don't go about having every component be a block. Millionjs at the moment has some use cases where it's best used granularly; Like from the bottom-up as opposed to the way most wrappers in libraries work.

What we have at the moment does make a lot of perf improvements so long as the stipulated rules (which are like limitations we're working actively to get rid of) are followed.

Check out https://million.dev/blog for more information

tobySolutions avatar Jun 11 '23 07:06 tobySolutions

Closed because of #294

aidenybai avatar Jul 16 '23 19:07 aidenybai