Answer the question
In order to leave comments, you need to log in
Is there any way to make the state change automatically after a certain period of time?
Is it possible to make setState automatically, say, 3 seconds after switching to the panel, change the value of the state from true to false ?
Now it looks like this
const [isLoading, setLoading] = React.useState(true);
const handleOnLoad = () => {
setLoading(false);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question