mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-05 03:47:12 +00:00
16 lines
429 B
Markdown
16 lines
429 B
Markdown
# `clearNuxtState`
|
|
|
|
Delete cached state of `useState`.
|
|
|
|
This method is useful if you want to invalidate the state of `useState`.
|
|
|
|
## Type
|
|
|
|
```ts
|
|
clearNuxtState (keys?: string | string[] | ((key: string) => boolean)): void
|
|
```
|
|
|
|
## Parameters
|
|
|
|
* `keys`: One or an array of keys that are used in [`useState`](/docs/api/composables/use-state) to delete their cached state. If no keys are provided, **all state** will be invalidated.
|