new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Nuxt · API · all subjects

composables/clear-nuxt-state

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

clearNuxtState signature

clearNuxtState is a function that deletes the cached state of useState. The signature is: export function clearNuxtState (keys?: string | string[] | ((key: string) => boolean), opts?: ClearNuxtStateOptions): void

clearNuxtState keys parameter

The keys parameter accepts one or an array of keys that are used in useState to delete their cached state. Keys can be a string, an array of strings, or a function that takes a key string and returns a boolean. If no keys are provided, all state will be invalidated.

clearNuxtState opts.reset option

The opts parameter accepts a ClearNuxtStateOptions object. The reset option (available since v4.4) when set to true resets the state to the initial value provided by the init function of useState instead of setting it to undefined. When not specified, it defaults to the value of experimental.defaults.useState.resetOnClear in the Nuxt config, which is true when compatibilityVersion is 5.

clearNuxtState minimum version

clearNuxtState requires Nuxt version 3.6 or higher.

Give your agent this brain