Nuxt/docs/3.api/3.utils/clear-nuxt-data.md
Sébastien Chopin f26a801775
docs: update to new website (#23743)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2023-10-18 12:59:43 +02:00

696 B

title description links
clearNuxtData Delete cached data, error status and pending promises of useAsyncData and useFetch.
label icon to size
Source i-simple-icons-github https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/asyncData.ts xs

::callout This method is useful if you want to invalidate the data fetching for another page. ::

Type

clearNuxtData (keys?: string | string[] | ((key: string) => boolean)): void

Parameters

  • keys: One or an array of keys that are used in useAsyncData to delete their cached data. If no keys are provided, all data will be invalidated.