what is equivalent componentdidmount in react native code example
Example: alternative for componentdidmount
import React, { useEffect } from 'react'const SampleComponent = () => { useEffect(() => { // code to run on component mount }, [])return (<div>foo</div>)}export SampleComponent