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

utilities/preload-components

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

preloadComponents utility signature and usage

preloadComponents is a utility for manually preloading individual components that have been registered globally in a Nuxt app. It accepts either a single component name as a string or an array of component names as strings. Component names must use the Pascal-cased version. The function is awaitable. Example: await preloadComponents('MyGlobalComponent') or await preloadComponents(['MyGlobalComponent1', 'MyGlobalComponent2']).

preloadComponents purpose and benefit

preloadComponents loads components that a page will need very soon, starting the load early in the rendering lifecycle. This ensures components are available earlier and are less likely to block the page's render, improving overall performance.

preloadComponents server-side behavior

On server, preloadComponents will have no effect.

preloadComponents component registration requirement

preloadComponents only works with components that have been registered globally in the Nuxt app. By default Nuxt registers these as async components.

preloadComponents example with single component

await preloadComponents('MyGlobalComponent')

preloadComponents example with multiple components

await preloadComponents(['MyGlobalComponent1', 'MyGlobalComponent2'])

Give your agent this brain