useutoscrolltobottom
v1.1.2
Published
## To install dependencies:
Downloads
297
Readme
useScrollToBottom
To install dependencies:
bun a useutoscrolltobottom
Usage:
import { useAutoScrollToBottom } from "useutoscrolltobottom"
// dep like a dep in useEffect tracking variable and scroll to bottom
const scrollRef = useAutoScrollToBottom<HTMLPreElement>({ deps: [text] })
<pre
className={"word-break-all overflow-y-auto h-[1000px] "}
ref={scrollRef}
>
...
</pre>
This project was created using bun
in bun v1.1.30. Bun is a fast all-in-one JavaScript runtime.