Answer the question
In order to leave comments, you need to log in
How to solve the problem with forceUpdate?
Hi there is a componentDidMount which fires two functions at a specific interval:
componentDidMount() {
setInterval(() => {
this.CheckingSetting()
this.OtherCheckingSetting()
}, 10000);
}
Answer the question
In order to leave comments, you need to log in
class Example extends React.Component {
interval;
componentDidMount() {
this.interval = setInterval(() => { /* ... */ }, 3000);
}
componentWillUnmount() {
clearInterval(this.interval);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question