mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
Compare commits
5 Commits
836be6816d
...
9de292befd
Author | SHA1 | Date | |
---|---|---|---|
|
9de292befd | ||
|
f94d3f2bc6 | ||
|
9c8cd4b74b | ||
|
7c2bb85054 | ||
|
293ea09866 |
@ -36,6 +36,10 @@ export default defineNuxtComponent({
|
||||
</script>
|
||||
```
|
||||
|
||||
::warning
|
||||
Data from `useAsyncData` is only set once in the `setup` hook of your component. This means `refreshNuxtData` will not work with `asyncData`. If you need to re-run `useAsyncData`, you can change it with a `method` of the Options API.
|
||||
::
|
||||
|
||||
## `head()`
|
||||
|
||||
If you choose not to use `setup()` in your app, you can use the `head()` method within your component definition:
|
||||
|
@ -12,6 +12,10 @@ links:
|
||||
`refreshNuxtData` re-fetches all data from the server and updates the page as well as invalidates the cache of [`useAsyncData`](/docs/api/composables/use-async-data) , `useLazyAsyncData`, [`useFetch`](/docs/api/composables/use-fetch) and `useLazyFetch`.
|
||||
::
|
||||
|
||||
::warning
|
||||
`refreshNuxtData` only works with Composition API. `asyncData` hook from the Options API does not work with `refreshNuxtData`.
|
||||
::
|
||||
|
||||
## Type
|
||||
|
||||
```ts
|
||||
|
@ -189,7 +189,6 @@ export default createConfigForNuxt({
|
||||
},
|
||||
},
|
||||
// Sort rule keys in eslint config
|
||||
// @ts-expect-error incorrect types 🤔
|
||||
{
|
||||
files: ['**/eslint.config.mjs'],
|
||||
name: 'local/sort-eslint-config',
|
||||
|
@ -40,7 +40,7 @@
|
||||
"@nuxt/ui-templates": "workspace:*",
|
||||
"@nuxt/vite-builder": "workspace:*",
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/node": "22.9.1",
|
||||
"@unhead/dom": "1.11.11",
|
||||
"@unhead/shared": "1.11.11",
|
||||
"@unhead/vue": "1.11.11",
|
||||
@ -75,7 +75,7 @@
|
||||
"@nuxt/webpack-builder": "workspace:*",
|
||||
"@testing-library/vue": "8.1.0",
|
||||
"@types/eslint__js": "8.42.3",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/node": "22.9.1",
|
||||
"@types/semver": "7.5.8",
|
||||
"@unhead/schema": "1.11.11",
|
||||
"@unhead/vue": "1.11.11",
|
||||
@ -91,7 +91,7 @@
|
||||
"devalue": "5.1.1",
|
||||
"eslint": "9.15.0",
|
||||
"eslint-plugin-no-only-tests": "3.3.0",
|
||||
"eslint-plugin-perfectionist": "3.9.1",
|
||||
"eslint-plugin-perfectionist": "4.0.2",
|
||||
"eslint-typegen": "0.3.2",
|
||||
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
|
||||
"happy-dom": "15.11.6",
|
||||
|
429
pnpm-lock.yaml
429
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user