Skip to content

Commit

Permalink
docs: add example about props
Browse files Browse the repository at this point in the history
Close #1375

Close #1361
  • Loading branch information
posva committed Apr 20, 2022
1 parent abc918f commit 5ad4864
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/api/index.md
Expand Up @@ -188,6 +188,14 @@ If you add a `target="_blank"` to your `a` element, you must omit the `@click="n
- `Component`: VNodes to be passed to a `<component>`'s `is` prop.
- `route`: resolved normalized [route location](#routelocationnormalized).

Note you should be passing View components' props directly to the `<component>` rather than the `<router-view>`:

```html
<router-view v-slot="{ Component, route }">
<component :is="Component" view-prop="value" />
</router-view>
```

## createRouter

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.
Expand Down

0 comments on commit 5ad4864

Please sign in to comment.