News for hackers. Stuff that matters.
Re:Next.js App Router Update by paulddraper on Thursday June 22, 2023 @09:31PM (#36441692)
Why?
Re:Next.js App Router Update by TechBro8615 on Thursday June 22, 2023 @09:56PM (#36441895)
> Next and React have gotten way too complicated.

Because I'm fed up with all the unnecessary complexity, and I want to try Vue because it looks a lot less complex, and I've already had a positive experience in the ecosystem with Vite and Vitest.

Re:Next.js App Router Update by paulddraper on Friday June 23, 2023 @12:45AM (#36442891)
I mean.... This just sounds like novelty.

You could keep using the react you've always liked?

Re:Next.js App Router Update by TechBro8615 on Friday June 23, 2023 @12:54PM (#36449434)
Yeah, it's a good point, and I'll continue to do that on my stable projects. But for a new project I'd like to try Vue, because I don't like the direction React is moving. In five years the "React I like" might not be available or widely practiced.

You're right that Vue will be a novelty - that's what I'm saying: React has jumped the shark to the point that it's now worth trying something for its novelty, because it just might be better.

Re:Next.js App Router Update by CharlieDigital on Friday June 23, 2023 @07:59AM (#36445640)
In general, any model that uses fine grained reactivity (Vue, Preact, Solid, Svelte) will be more "forgiving" then one that uses coarse grained reactivity (React) because it triggers smaller component tree updates.

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.

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.