Rubayed Ahmed Foysal’s Post

✨ 𝗗𝗮𝘆 𝟲 𝗼𝗳 𝗠𝘆 𝗥𝗲𝗮𝗰𝘁 𝗝𝗼𝘂𝗿𝗻𝗲𝘆 ⚛️🚀 Today I learned about 𝗥𝗲𝗮𝗰𝘁 𝗽𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗼𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻 using `𝗥𝗲𝗮𝗰𝘁.𝗺𝗲𝗺𝗼`, `𝘂𝘀𝗲𝗠𝗲𝗺𝗼`, and `𝘂𝘀𝗲𝗖𝗮𝗹𝗹𝗯𝗮𝗰𝗸`. While building components, I noticed that React sometimes re-renders more than needed. Today’s learning helped me understand how to control that.  • `𝗥𝗲𝗮𝗰𝘁.𝗺𝗲𝗺𝗼`: prevents unnecessary re-renders of components  • `𝘂𝘀𝗲𝗠𝗲𝗺𝗼`: memoizes expensive calculations  • `𝘂𝘀𝗲𝗖𝗮𝗹𝗹𝗯𝗮𝗰𝗸`: memoizes functions to avoid recreating them on every render What stood out to me is that these tools don’t make apps faster by default — they help 𝗮𝘃𝗼𝗶𝗱 𝘂𝗻𝗻𝗲𝗰𝗲𝘀𝘀𝗮𝗿𝘆 𝘄𝗼𝗿𝗸 when used in the right place. Starting to understand how React handles performance behind the scenes 💻⚡ #ReactJS #JavaScript #WebDevelopment #LearningJourney #FrontendDevelopment

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories