diff --git a/active-rfcs/0000-new-slot-syntax.md b/active-rfcs/0000-new-slot-syntax.md new file mode 100644 index 00000000..49471d9f --- /dev/null +++ b/active-rfcs/0000-new-slot-syntax.md @@ -0,0 +1,338 @@ +- Start Date: 2019-01-14 +- Target Major Version: 2.x & 3.x +- Reference Issues: https://github.com/vuejs/vue/issues/7740, https://github.com/vuejs/vue/issues/9180, https://github.com/vuejs/vue/issues/9306 +- Implementation PR: (leave this empty) + +# Summary + +Introducing a new syntax for scoped slots usage: + +- New directive `v-slot` that unifies `slot` and `slot-scope` in a single directive syntax. + +- Shorthand for `v-slot` that can potentially unify the usage of both scoped and normal slots. + +# Basic example + +Using `v-slot` to declare the props passed to the scoped slots of ``: + +``` html + + + {{ msg }} + + + + + + +``` + +# Motivation + +When we first introduced scoped slots, it was verbose because it required always using `