I want to call a function only once after some interval in my app
for that I have choosed the hook useEffect
. Not I want to call it after some interval to make a variable account defined
which comes from useEthers()
Any help will be appriciated.
The script I am using :
// import { useEffect, useState } from "react"
import { useEthers, useContractFunction, useCall, useLogs} from const i = () => {
console.log(account) //I want to log the account after 3 secs
toast.info('Fetching content...' )
// console.log('Signin calling now??', account)
// SignIn()
}
useEffect(() => {
i()
}, []) // add [] to only call this once
return (
<div>
<h1 >Hello this is login activity {account}</h1>
</div>
)
}