Skip to content

Commit b7f59db

Browse files
docs: mention useRouter for programmatic navigation (#2070)
1 parent f67a770 commit b7f59db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/docs/guide/essentials/navigation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Aside from using `<router-link>` to create anchor tags for declarative navigatio
1313

1414
## Navigate to a different location
1515

16-
**Note: Inside of a Vue instance, you have access to the router instance as `$router`. You can therefore call `this.$router.push`.**
16+
**Note: The examples below refer to the router instance as `router`. Inside a component, you can access the router using the `$router` property, e.g. `this.$router.push(...)`. If you're using the Composition API, the router is accessible by calling [`useRouter()`](../advanced/composition-api).**
1717

1818
To navigate to a different URL, use `router.push`. This method pushes a new entry into the history stack, so when the user clicks the browser back button they will be taken to the previous URL.
1919

0 commit comments

Comments
 (0)