DEV Community

Discussion on: 🚀 React performance quick wins 🚀 - 7 easy ways to improve your React performance - part 1

Collapse
 
sgolovine profile image
Sunny Golovine

Something to watch out for when using a single useState hook, you want to pay attention and make sure it doesn't cause re-renders for the entire form whenever you update a single field. A project I worked on a while back suffered from massive performance issues due to re-renders.

Collapse
 
mkuehb profile image
Marco Kühbauch

That’s a great addition Sunny, thanks for that! And you‘re absolutely right. For a large form with a lot of input fields this could be an absolute performance nightmare. I think you always have to look closely and re-evaluate it for your individual usecase. For my small example here I think it’s alright.