Skip to content

RFC: Inline Local Components#824

Draft
ubugeeei wants to merge 1 commit intovuejs:masterfrom
ubugeeei-forks:icl
Draft

RFC: Inline Local Components#824
ubugeeei wants to merge 1 commit intovuejs:masterfrom
ubugeeei-forks:icl

Conversation

@ubugeeei
Copy link
Copy Markdown
Member

@ubugeeei ubugeeei commented Mar 6, 2026

WIP

@ubugeeei ubugeeei changed the title feat: ilc Inline Local Components Mar 7, 2026
@ubugeeei ubugeeei changed the title Inline Local Components RFC: Inline Local Components Mar 7, 2026
@naitokosuke
Copy link
Copy Markdown

I like this style!

I found this tweet in my bookmark.
Maybe related or similar idea, I'll tag it.
https://x.com/sanxiaozhizi/status/1582185668335529985

#517

@jods4
Copy link
Copy Markdown

jods4 commented Mar 12, 2026

I really like the simple concept of having named <template> tags in SFC for lightweight local components, like the X post linked by naitokosuke shows.

Having full blown <component> that includes script/template/style (... and then why not other <components> recursively?) feels too heavyweight to me, at this point if I need more than a template I would create a new SFC file.

Two points that would need a dedicated syntax:

  1. How could a lightweight local template declare props? Maybe we can have props attributes with a tiny DSL or just a TS type?
    <template name='local-component' props="{ name: string, age: number }">

  2. It would be nice to be able to refer to local components not only from template but also from script.
    A use case I would have is declaring a renderer for a data-grid columns definition object.

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

Successfully merging this pull request may close these issues.

3 participants