mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-28 08:32:06 +00:00
f26a801775
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
629 B
629 B
title | description | links | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
clearNuxtState | Delete the cached state of useState. |
|
::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 inuseState
to delete their cached state. If no keys are provided, all state will be invalidated.