Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert componentWillUnmount into useEffect

useEffect(() => {
  return () => {
    // code to run when the component is unmounted
  }
})
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #convert #componentWillUnmount #useEffect
ADD COMMENT
Topic
Name
8+1 =