You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 }">
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP