Skip to content

Commit bb130e0

Browse files
nazarepiedadyposva
authored andcommitted
docs: mention both useRoute and useRouter functions (#1680)
1 parent 3073bae commit bb130e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/docs/guide/advanced/composition-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The introduction of `setup` and Vue's [Composition API](https://v3.vuejs.org/gui
99

1010
## Accessing the Router and current Route inside `setup`
1111

12-
Because we don't have access to `this` inside of `setup`, we cannot directly access `this.$router` or `this.$route` anymore. Instead we use the `useRouter` function:
12+
Because we don't have access to `this` inside of `setup`, we cannot directly access `this.$router` or `this.$route` anymore. Instead we use the `useRouter` and `useRoute` functions:
1313

1414
```js
1515
import { useRouter, useRoute } from 'vue-router'

0 commit comments

Comments
 (0)