Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { useEffect } from 'react'
- const Child = () => {
- useEffect(() => {
- console.log('componentDidMount')
- return () => {
- console.log('componentWillUnmount')
- }
- }, []);
- return (
- <div>
- Child component
- </div>
- )
- }
- export default Child
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement