@tanstack/solid-router
Version:
Modern and scalable routing for Solid applications
9 lines (8 loc) • 488 B
TypeScript
import * as Solid from 'solid-js';
/**
* Observe a Link's element while it preloads on `'viewport'`: `callback`
* receives each intersection entry. Whenever the element or preload mode
* changes, and on cleanup, a preloading Link gets `callback()` so it can
* cancel a pending preload.
*/
export declare function useIntersectionObserver<T extends Element>(ref: Solid.Accessor<T | null>, callback: (entry?: IntersectionObserverEntry) => void, preload: Solid.Accessor<unknown>): void;