vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.84k stars 1.18k forks source link

docs: add a guide to the RouterView slot #2049

Closed skirtles-code closed 9 months ago

skirtles-code commented 9 months ago

The slot for RouterView is mentioned in a few places within the docs, but it isn't directly explained anywhere. This PR adds a new page to the advanced guides covering that topic.

Perhaps this isn't the best way to introduce the topic, but maybe it'll be useful as a starting point to discuss it further.

I've put this guide just before the guide to transitions, as that guide heavily relies on using the slot. The slot is also used in the earlier guide to passing props, but I didn't think it made sense to have this new page in the Essentials section. Instead, I've just linked to the new page from that earlier page.

There are a few things I would like any reviewers to consider:

netlify[bot] commented 9 months ago

Deploy Preview for vue-router ready!

Name Link
Latest commit 05c5fd5f08ed7793c0682490b3833f976edf4166
Latest deploy log https://app.netlify.com/sites/vue-router/deploys/655ed4ed4ec7af00085eeae3
Deploy Preview https://deploy-preview-2049--vue-router.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

skirtles-code commented 9 months ago

I think I've made all the requested changes.

I had to reword a few bits because the wording didn't quite work with the new order.

I also spotted some small mistakes in the original draft which I've now corrected.