Think of React Components as State Machines, Not Functions
Published in
7 min readJun 15, 2021
When React Components moved from classes to functions, all the buzz was about transitioning from Object-Oriented Programming to Functional Programming. Functional programming has two goals in mind:
- You get the same results when you provide the same inputs to a function.
- The function’s only goal is to create an output. It doesn’t try to do…