There are too many variables to make a blanket statement that memoization will always improve performance of a Component. For some Components, memoization may take longer than a full re-render!
I discovered this issue specifically due to a performance problem in one of my applications that was re-rendering on a short interval. The event listeners were being recreated each interval, and the application slowed to a crawl as a result. Memoization removed the lag entirely.
This article hopefully just educates on how it works, and each developer can determine if and how best to apply it to their own projects.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are too many variables to make a blanket statement that memoization will always improve performance of a Component. For some Components, memoization may take longer than a full re-render!
I discovered this issue specifically due to a performance problem in one of my applications that was re-rendering on a short interval. The event listeners were being recreated each interval, and the application slowed to a crawl as a result. Memoization removed the lag entirely.
This article hopefully just educates on how it works, and each developer can determine if and how best to apply it to their own projects.