News for hackers. Stuff that matters.
Re:Why I don't miss React: a story about using the platform by srcreigh on Tuesday May 03, 2022 @08:24PM (#31255398)
React offers tons of optimizations for not re-rendering. useEffect, useMemo, useCallback.
Re:Why I don't miss React: a story about using the platform by mycall on Wednesday May 04, 2022 @12:36AM (#31256803)
React 18 even will have batching built into all state.
Re:Why I don't miss React: a story about using the platform by Izkata on Wednesday May 04, 2022 @07:55AM (#31259247)
"by default". You still have to use those manually.

One of the promises of switching from class-based components to function-based was supposed to be an automatically applied version of shouldComponentUpdate, which AFAIK was never fulfilled.

Re:Why I don't miss React: a story about using the platform by ricardobeat on Thursday May 05, 2022 @05:35PM (#31278660)
Not true. Even if you memoize all the values and props used, your component will still execute, generate vdom and go through reconciliation. You must use React.memo in addition to memorizing everything in order to completely prevent a no-op re-render.