Back to products
u

PRODUCT DETAILS

use-first-interaction

A React hook for the first time a visitor touches the page

Launch date · UTC
2026-11-11
Domain
—
Domain ending
—
Category
Developer tools

About this product

Analytics, chat widgets and heatmap recorders don't need to be in the first paint. use-first-interaction is a React hook that returns false until the first keydown, pointerdown, scroll, touchstart or wheel on the page, then true for good, so you can load those scripts when someone actually arrives. It is false on the server and the first client render, so hydration never differs, and the interaction is shared across every hook on the page. Free and open source.

Keywords

lazy loadingreact hookuser interaction