MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / useScrollToTop

Function useScrollToTop

src/hooks/useScrollToTop.js:3–5  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useEffect } from 'react';
2
3const useScrollToTop = () => {
4 useEffect(() => window.scrollTo(0, 0), []);
5};
6
7export default useScrollToTop;

Callers 6

SponsorsPageFunction · 0.85
LandingPageFunction · 0.85
ShowcasePageFunction · 0.85
InstallationFunction · 0.85
IntroductionFunction · 0.85
McpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected