Skip to content

Commit 5ad4864

Browse files
committed
docs: add example about props
Close #1375 Close #1361
1 parent abc918f commit 5ad4864

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/api/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@ If you add a `target="_blank"` to your `a` element, you must omit the `@click="n
188188
- `Component`: VNodes to be passed to a `<component>`'s `is` prop.
189189
- `route`: resolved normalized [route location](#routelocationnormalized).
190190

191+
Note you should be passing View components' props directly to the `<component>` rather than the `<router-view>`:
192+
193+
```html
194+
<router-view v-slot="{ Component, route }">
195+
<component :is="Component" view-prop="value" />
196+
</router-view>
197+
```
198+
191199
## createRouter
192200

193201
Creates a Router instance that can be used by a Vue app. Check the [`RouterOptions`](#routeroptions) for a list of all the properties that can be passed.

0 commit comments

Comments
 (0)