Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

componentdidmount react hooks

const msg = "some message"

const myFunc = useCallback(() => {
  console.log(msg)
}, [msg])

useEffect(() => {
  myFunc()
}, [myFunc])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #componentdidmount #react #hooks
ADD COMMENT
Topic
Name
1+9 =