Custom React hook that triggers an effect once the page has fully loaded.
const MyComponent = () => { useOnPageLoad(() => { console.log('Page has loaded!'); }, []); return <div>Welcome to my website!</div>;};
Custom React hook that triggers an effect once the page has fully loaded.
Example