Source:
componentDidMount() {
// life hooks, assembly is hung after the call
this.func ();
}
func = () => {
setInterval(() => {
alert ( "every 2 seconds calls a function");
}, 2000);
}
Source:
componentDidMount() {
// life hooks, assembly is hung after the call
this.func ();
}
func = () => {
setInterval(() => {
alert ( "every 2 seconds calls a function");
}, 2000);
}