mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
docs: update 3rd party bridge imports to use #imports
(#2283)
This commit is contained in:
parent
5a9878207a
commit
bb43d0a7a1
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user