I want to call callSomeFunction on the first render of my component, what is the correct syntax?
callSomeFunction
const SomeComponent=(props)=>{ ... componentDidMount(()=>{ callSomeFunction() }) ... }
const SomeComponent=(props)=>{ ... useEffect( ()=>{ callSomeFunction(); },{onlyOnce: true} ); ... }
const SomeComponent=(props)=>{ ... useEffect(()=>{ callSomeFunction() },[]) ... }
const SomeComponent=(props)=>{ ... useEffect(()=>{ callSomeFunction() }) ... }