🔥 Burn Fat Fast. Discover How! 💪

OK, most of you used this approach and don't see why it can be | TheFrontEnd🔥

OK, most of you used this approach and don't see why it can be debatable (although a few mentioned in comments several concerns, well done).

The reason I pointed this one out is because doing this often is a bad idea.

I failed to compile a list of articles and proper explanation, but all I want to point out here is that using arrow functions in React in this way can cause you rendering problems when your app grows. You should use it very carefully with paint flashing in browser to ensure you don't render unnecessary things.

The main issue is that a lot of react tutorials online teach you to do this and a lot of even senior frontend devs do that (to a point where it starts causing problems, trust me I've seen it too many times). The main explanation being: "well why not, it's documented that it's fine to do so here and here" .

I suggest researching why this is not always good (since I'm terrible in finding time to explain and write a proper post).

You can start with the below article that goes into explaining this one (but please go further in your research, testing it yourself is the best way):

https://www.freecodecamp.org/news/why-arrow-functions-and-bind-in-reacts-render-are-problematic-f1c08b060e36/