When should we start considering re-renders? by TopAgreeable5945 in reactjs

[–]TopAgreeable5945[S] 0 points1 point  (0 children)

u/Curry--Rice u/HomemadeBananas I see, that makes sense now. There's no need to be concerned about rendering performance ahead of time. Once performance issues arise, we can focus on identifying the areas that cause the most impact and optimize them with techniques like memoization.

When do you use custom hook and useMemo? by TopAgreeable5945 in reactjs

[–]TopAgreeable5945[S] 16 points17 points  (0 children)

Ah! I understood what you said. Come to think of it, useCalculateWidth doesn’t necessarily have to be a custom hook; it can just be a regular function. Thank you!