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/prefetch-components

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.

prefetchComponents utility function

prefetchComponents is a utility that manually prefetches individual components that have been registered globally in a Nuxt app. It downloads component code in the background based on the assumption that the component will likely be used for rendering, enabling instant loading when requested. The component is downloaded and cached for anticipated future use without explicit user request.

prefetchComponents accepts single component name or array

prefetchComponents accepts either a single component name as a string or an array of component names. Component names must use Pascal-case (e.g., 'MyGlobalComponent'). Example usage: await prefetchComponents('MyGlobalComponent') or await prefetchComponents(['MyGlobalComponent1', 'MyGlobalComponent2'])

prefetchComponents behavior on server

On the server, prefetchComponents will have no effect. It only functions on the client-side.

prefetchComponents currently behaves like preloadComponents

The current implementation of prefetchComponents behaves exactly the same as preloadComponents by preloading components instead of just prefetching. The Nuxt team is working to improve this behavior to distinguish between prefetching and preloading.

Give your agent this brain