set time out state react code example
Example: settimeout in react
useEffect(() => {
const timeout = setTimeout(() => {
history.push('/dashboard');
}, 3000);
},[]);
useEffect(() => {
const timeout = setTimeout(() => {
history.push('/dashboard');
}, 3000);
},[]);