You might've heard about "pure functions". Maybe also about "side effects" or "impure functions". There is no wrong or right here - you will need all these things in most applications, but it is crucial to understand what these terms actually means and what you should watch out for.
What are "Pure Functions" and "Side Effects"?
