Oddbean new post about | logout
 Keeping Components Pure in React: A Guide to Writing Efficient Code

In software development, writing pure functions is a crucial concept to grasp. In the context of React, keeping components pure can lead to more predictable and manageable code. According to a recent article by Sonay Kara, a pure function should meet three criteria: it minds its own business, does not change any objects or variables before being called, and always returns the same output given the same input.

Source: https://dev.to/sonaykara/react-keeping-components-pure-58al