Nuxt/docs/3.api/3.utils/clear-nuxt-state.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

629 B

title description links
clearNuxtState Delete the cached state of useState.
label icon to size
Source i-simple-icons-github https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/state.ts xs

::callout This method is useful if you want to invalidate the state of useState. ::

Type

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

Parameters

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