use of setimeout causing component to not render react code example
Example: settimeout in react
useEffect(() => {
const timeout = setTimeout(() => {
history.push('/dashboard');
}, 3000);
},[]);
useEffect(() => {
const timeout = setTimeout(() => {
history.push('/dashboard');
}, 3000);
},[]);