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

utils/reload-nuxt-app

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

reloadNuxtApp utility function signature

reloadNuxtApp is a utility function that performs a hard reload of the app, re-requesting a page and its dependencies from the server. It accepts an optional ReloadNuxtAppOptions object and returns void. The function signature is: export function reloadNuxtApp (options?: ReloadNuxtAppOptions)

reloadNuxtApp minimum version

reloadNuxtApp utility requires Nuxt version 3.3 or later.

reloadNuxtApp default state saving behavior

By default, reloadNuxtApp will save the current state of your app (any state accessible with useState) before performing the hard reload.

reloadNuxtApp options interface

The ReloadNuxtAppOptions interface has the following properties: ttl (optional, type: number, default: 10000), force (optional, type: boolean, default: false), path (optional, type: string, default: window.location.pathname), persistState (optional, type: boolean, default: false).

reloadNuxtApp path option

The path option specifies the path to reload, defaulting to window.location.pathname (the current path). If this is different from the current window location, it will trigger a navigation and add an entry in the browser history.

reloadNuxtApp ttl option

The ttl (time to live) option specifies the number of milliseconds in which to ignore future reload requests, with a default of 10000 milliseconds. If reloadNuxtApp is called again within this time period, it will not reload your app to avoid reload loops.

reloadNuxtApp force option

The force option is a boolean (default: false) that allows bypassing reload loop protection entirely. When set to true, it forces a reload even if one has occurred within the previously specified TTL.

reloadNuxtApp persistState option

The persistState option is a boolean (default: false) that specifies whether to dump the current Nuxt state to sessionStorage under the key 'nuxt:reload:state'. By default this has no effect on reload unless experimental.restoreState is also set, or unless you handle restoring the state yourself.

reloadNuxtApp experimental state restoration

State restoration from sessionStorage can be enabled by setting the experimental.restoreState option in your nuxt.config file.

Give your agent this brain