Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import React, { useEffect } from 'react'
  2.  
  3. const Child = () => {
  4. useEffect(() => {
  5. console.log('componentDidMount')
  6. return () => {
  7. console.log('componentWillUnmount')
  8. }
  9. }, []);
  10.  
  11. return (
  12. <div>
  13. Child component
  14. </div>
  15. )
  16. }
  17.  
  18. export default Child
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement