mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat: add delayed-hydration loaders for fine-grained control
This commit is contained in:
parent
c14580d8c1
commit
23d0b8e4c8
@ -23,3 +23,15 @@ export const useHydration = <K extends keyof NuxtPayload, T = NuxtPayload[K]> (k
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `requestIdleCallback` options utility, used for determining custom timeout for idle-callback based delayed hydration.
|
||||
* @param opts the options object, containing the wanted timeout
|
||||
*/
|
||||
export const createIdleLoader = (opts: IdleRequestOptions) => opts
|
||||
|
||||
/**
|
||||
* An `IntersectionObserver` options utility, used for determining custom viewport-based delayed hydration.
|
||||
* @param opts the options object, containing the wanted viewport options
|
||||
*/
|
||||
export const createVisibleLoader = (opts: IntersectionObserverInit) => opts
|
||||
|
Loading…
Reference in New Issue
Block a user