Are your functional React components acting up? In this article we will explore 5 Ways to Optimize Your Functional React Components
There’s a good chance you’ve heard using arrow functions is better than using .bind, which is definitely true. But when it comes to functional React, we can avoid using arrow functions as well in many cases, since they create a new function every time a component is re-rendered. We can do this by simply defining a function with the function keyword instead of using an arrow.
For example, this component uses 3 arrow functions:
#reactjs #react #javascript #programming