mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: mention new defineNuxtPlugin
syntax in bridge migration (#23036)
This commit is contained in:
parent
21c22c87ba
commit
36798e8c26
@ -109,6 +109,12 @@ import type { Plugin } from '@nuxt/types'
|
|||||||
export default <Plugin> function (ctx, inject) {}
|
export default <Plugin> function (ctx, inject) {}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::alert{type="warning"}
|
||||||
|
While this example is valid, Nuxt 3 introduces a new defineNuxtPlugin function that has a slightly different signature.
|
||||||
|
::
|
||||||
|
|
||||||
|
:ReadMore{link="/docs/guide/directory-structure/plugins#creating-plugins"}
|
||||||
|
|
||||||
### `useRouter` and `useRoute`
|
### `useRouter` and `useRoute`
|
||||||
|
|
||||||
Nuxt Bridge provides direct replacements for these composables via [`useRouter`](/docs/api/composables/use-router) and `useRoute`.
|
Nuxt Bridge provides direct replacements for these composables via [`useRouter`](/docs/api/composables/use-router) and `useRoute`.
|
||||||
|
Loading…
Reference in New Issue
Block a user