8000 add small note regarding shorthand justification · vuejs/rfcs@2b3877a · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b3877a

Browse files
committed
add small note regarding shorthand justification
1 parent d47e004 commit 2b3877a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

active-rfcs/0000-new-scoped-slots-syntax.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,8 @@ However, there were very mixed opinions on which symbol should be used for the s
401401

402402
Personally, I think a shorthand is a beneficial addition, as it makes the slot designation jump out from normal props and directives and makes the template easier to scan.
403403

404+
Some may argue that scoped slots are not that commonly used and therefore don't really need a shorthand. On that front, I actually believe scoped slot is an important mechanism for building 3rd party component suites that are highly customizable. For a user using a component collection with an API that relies heavily on slots, a shorthand will become quite valuable.
405+
404406
After the initial round of feedback I agree that `()` as the shorthand can be potentially confusing to beginners, and am now leaning towards `#`. Some examples of the usage in a real-world library that relies on scoped slots ([vue-promised](https://github.com/posva/vue-promised)):
405407

406408
``` html

0 commit comments

Comments
 (0)
0