Re:Next.js App Router Update
by paulddraper on Friday June 23, 2023 @10:30AM
(#36447285)
If re-renders are causing bugs, you are 100% holding the tool wrong.
If implicit, fine grained reactivity is the sole point of concern, you might be interested in MobX.
Re:Next.js App Router Update
by CharlieDigital on Saturday June 24, 2023 @09:35PM
(#36464388)
Every React team I've worked with has held the tool wrong because on every project I've been on in 3 VC backed startups, I've had to track down unintended side effects.
MobX and Valtio create an illusion of fine-grained reactivity but do not change the underlying render cycle of React itself.
This tends to reduce certain classes of bugs like side effects from unexpected re-renders and performance issues like over rendering.
The thing with React and Next is that it's great if your team is relatively homogeneous in terms of skill and experience or you have strong systems in place to enforce practices. However, the render cycle of React and the provider pattern is prone to bugginess otherwise. A firsthand example is Algolia's React components. Look at the GH issues. We ran into tons of issues related to unexpected redraws.