DEV Community

Discussion on: Common React performance mistakes 💣

lukeshiru profile image

About the inline functions, take a look at this article by Ryan Florence (co-creator of react-router). The TL;DR would be: In real life scenarios, it doesn't matter much, just write your code as you want to write it. If you prefer to have callbacks for events in external functions to make it more readable, do it. If you prefer a more inline approach, that's ok as well.

karthick30 profile image
KaRthick Author

yeah true ! I personally I prefer callbacks but at the same time mentioned it to break that usage of in-line functions can be valid too