render a component after specific timeout react functional component code example
Example: settimeout in react
useEffect(() => {
const timeout = setTimeout(() => {
history.push('/dashboard');
}, 3000);
},[]);
useEffect(() => {
const timeout = setTimeout(() => {
history.push('/dashboard');
}, 3000);
},[]);