-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In a lot of cases, the priority of an update is based on whether an element is in the viewport or not.
With a simple helper function, we can make it more convenient to define it properly.
const MyComponent = () => {
const element = useRef(null);
const scroll = useScroll({
priority: createViewportPriorityUpdater(element),
});
return <div ref={ref} />;
};Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request