mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +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) {}
|
||||
```
|
||||
|
||||
::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`
|
||||
|
||||
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