News for hackers. Stuff that matters.
Re:Common mistakes writing React components with hooks by Kiro on Tuesday July 21, 2020 @12:53PM (#23908482)
I have a really large chat app with thousands of users and I realized the other day that I accidentally re-render the root component on _every keystroke_. Still, it's not a disaster and I haven't bothered to fix it because no-one notices.
Re:Common mistakes writing React components with hooks by steinuil on Tuesday July 21, 2020 @03:18PM (#23909958)
Shouldn't be a big deal if it's properly split into subcomponents and their props don't change with every rerender as well.