File: usetimeout.md | Updated: 11/15/2025
Introducing PrimeReact v11 Alpha 🥁Learn More
SearchK
10.9.7
HOOK
API
Executed a given callback after a certain delay.
Import#
import { useTimeout } from 'primereact/hooks';
Copy
Basic#
Wait for 3 seconds to view the Toast message.
A message will be displayed in 3 seconds after mount.
const [clearTimeout] = useTimeout(() => {
toast.current.show({ severity: 'info', summary: 'Loaded' });
}, 3000);
Copy
Import
Basic
PrimeReact 10.9.7 by PrimeTek