Stop premature optimization with 𝘂𝘀𝗲𝗠𝗲𝗺𝗼. It’s not free. wrapping every simple string concatenation or array map actually hurts performance due to the hook's internal overhead. Only memoize computationally expensive tasks. Measure first, optimize second. 📉 #typescript #react #nodejs #javascript #webdevelopment #bhadreshpithwa #webdeveloperguide #bestpractices #memo
Yes we should use useMemo for non primitive value.
also useMemo should be used when the dependencies repeat values often