Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to new vue slot syntax #267

Open
ChristianMurphy opened this issue Feb 19, 2019 · 0 comments
Open

Update to new vue slot syntax #267

ChristianMurphy opened this issue Feb 19, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers semver patch a change that does not impact the API

Comments

@ChristianMurphy
Copy link
Member

https://medium.com/the-vue-point/vue-2-6-released-66aa6c8e785e

The new syntax unifies the usage of normal and scoped slots in a single directive, and enforces more explicit and readable named slots usage. It is also fully compatible with the existing syntax, which allows us to ship it today in 2.6.

If you are already familiar with the existing slot syntax, we recommend you to read through the RFC to better understand the rationale behind the new syntax. If you are not yet familiar with slots, it is recommended to go through the updated slots documentation instead.

<my-component>
  <template v-slot:header>
    <p>Header</p>
  </template>
  
  <template v-slot:item="{ data }">
    <h2>{{ data.title }}</h2>
    <p>{{ data.text }}</p>
  </template>
  
  <template v-slot:footer>
    <p>Footer</p>
  </template>
</my-component>

📓 this will not impact our usage, downstream adopters can still use these slots the same as the ones we ship today.

@ChristianMurphy ChristianMurphy added enhancement New feature or request good first issue Good for newcomers semver patch a change that does not impact the API labels Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers semver patch a change that does not impact the API
Projects
None yet
Development

No branches or pull requests

1 participant