Skip to content

Instantly share code, notes, and snippets.

@showlovezz
Created May 5, 2020 00:51
Show Gist options
  • Save showlovezz/5aa6d88416b40d67bcd1459bede9f3ef to your computer and use it in GitHub Desktop.
Save showlovezz/5aa6d88416b40d67bcd1459bede9f3ef to your computer and use it in GitHub Desktop.
鼠年全馬鐵人挑戰 - React Hooks useEffect 2
useEffect(() => {
// 副作用處理
return () => {
// 清理工作,類似於 componentWillUnmount
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment