Side effects make a function impure, and one of the examples of side effects is
React documentation states that side effects usually belong inside event handlers or useEffect. However, by using functions with impure code such as event handlers with side effects, or useEffect that's handling a side effect, doesn't that make the component impure?