Relearning React: From Classes to Hooks
7 min readJun 22, 2020
If you’ve been using React for a while, you’ve seen it evolve from classes to functions, but the documentation hasn’t caught up. It describes Hooks, but still describes component lifecycle in class terms, and it causes a lot of confusion. A year after their introduction, people keep asking how to mimic componentDidUpdate
in Hooks, when managing side effects with Hooks is completely different and significantly easier.