docs: update 3rd party bridge imports to use #imports (#2283)

This commit is contained in:
Daniel Roe 2021-12-06 11:27:36 +01:00 committed by GitHub
parent 5a9878207a
commit bb43d0a7a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,11 +35,11 @@ Because some composables have been removed and don't yet have a replacement, thi
* `useStatic` has been removed. There is no current replacement. Feel free to raise a discussion if you have a use case for this.
* `reqRef` and `reqSsrRef`, which were deprecated, have now been removed entirely. Follow the instructions below regarding [ssrRef](#ssrref-and-shallowssrref) to replace this.
2. Remove any explicit imports of the basic Vue Composition API composables, or move them to import from `#app` or `vue`.
2. Remove any explicit imports of the basic Vue Composition API composables, or move them to import from `#imports` or `vue`.
```diff
- import { ref, useContext } from '@nuxtjs/composition-api`
+ import { ref } from '#app'
+ import { ref } from '#imports'
```
3. For each other composable you are using from `@nuxtjs/composition-api`, follow the steps below.
@ -129,7 +129,7 @@ The only key difference is that `useRoute` no longer returns a computed property
```diff
- import { useRouter, useRoute } from '@nuxtjs/composition-api'
+ import { useRouter, useRoute } from '#app'
+ import { useRouter, useRoute } from '#imports'
const router = useRouter()
const route = useRoute()