Skip to content

Instantly share code, notes, and snippets.

@louisrli
Created June 9, 2020 15:02
Show Gist options
  • Save louisrli/c136857f6d6ca7d26df868a985bd86bc to your computer and use it in GitHub Desktop.
Save louisrli/c136857f6d6ca7d26df868a985bd86bc to your computer and use it in GitHub Desktop.
Discussion questions on React.useEffect()
1. When does a React component re-render?
2. What does the React.useMemo hook do?
@halitbatur
Copy link

3.How can you replicate componentWillUnmount using useEffect ?
4. How can you replicate componentDidUpdate using useEffect ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment