Skip to content

Commit

Permalink
docs: mention new defineNuxtPlugin syntax in bridge migration (#23036)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienZ committed Nov 13, 2023
1 parent 21c22c8 commit 36798e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/6.bridge/3.bridge-composition-api.md
Expand Up @@ -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`.
Expand Down

0 comments on commit 36798e8

Please sign in to comment.