返回产品列表
u

产品详情

use-first-interaction

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

发布日期 · UTC
2026-11-11
产品域名
—
域名后缀
—
产品方向
开发者工具

关于产品

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.

关键词

lazy loadingreact hookuser interaction