Blog Logo

Little React Things: Less reacting, more deriving

In this second post in the Little React Things series, Zeke Hernandez talks about how we should remove unnecessary reactions from our React applications and replace them with derivations. He discusses how the useEffect utility, while useful, can also be problematic when used incorrectly. Hernandez provides an example of an app where a function is called unnecessarily each time a component is rendered and suggests a better approach that relies on derivations rather than reactions. He also emphasizes the importance of not calling functions more than necessary and shows how to avoid syncing issues between state and props. Overall, the article promotes a more efficient and effective approach to using React in web development.