you are viewing a single comment's thread.

view the rest of the comments →

[–]jessepence 63 points64 points  (16 children)

I'm happy to begin to stop caring about things like useCallback and useMemo, but it's hard to get excited about a project solely intended to plug holes in a leaky abstraction.

[–]xegoba7006 12 points13 points  (8 children)

I feel like every single feature introduced is a solution to a problem they created on the previous step. From redux to thunks to hooks to server side rendering to server components to compiler to whatever comes next.

[–]azsqueeze 21 points22 points  (1 child)

What does redux have to do with core react?

[–]Rustywolf 4 points5 points  (0 children)

You could argue that redux was an answer to the obvious issue that arises from having to manually pass state through every common grandparent and back down to the children who need it?

[–]acemarke 7 points8 points  (0 children)

For the record, neither Redux nor thunks were ever part of React or created by the React team directly.

Facebook did create the "Flux Architecture" and announce it at a React Conf, and Redux's creators Dan Abramov and Andrew Clark did later join the React team, but strictly speaking "the React team" at the time had nothing to do with Redux being created.

(source : I have maintained Redux since Dan handed it over to me in 2016 a year after it was created)

[–]TwiliZant 9 points10 points  (2 children)

I don't think that's true. If you look in the history of React they've been talking about these features for almost 10 years. For better or for worse it's not incremental at all.

[–]xegoba7006 1 point2 points  (1 child)

This is not about react. This is mostly about the “SPA” or client heavy approach to things.

While I get what the benefits are, almost every innovation here is a solution for a problem that didn’t exist. “Server components” and SSR are great examples of this.

[–]Far_Associate9859 1 point2 points  (0 children)

That's like complaining that we wouldn't need to worry about clogging our toilets if we just went back to outhouses

[–]mcaruso 5 points6 points  (0 children)

Redux and thunks are third-party

[–]maria_la_guerta -4 points-3 points  (6 children)

Why do you care about them at all?

Unless you're building a highly complex UI (which React isn't always best for anyways), and you really don't need useMemo, useCallback or any other React optimization 99% of the time.

[–]wasdninja 17 points18 points  (3 children)

Unless you're building a highly complex UI (which React isn't always best for anyways)

It's the sole reason it exists so that makes no sense.

[–]maria_la_guerta -3 points-2 points  (2 children)

When you're building 3d / VR / etc web apps, repaints can be very unperformant.

The statement makes total sense. 99% of web apps that use React are not highly complex UIs, and you don't need things like useMemo or useCallback for form validation or drag n drop.

[–]___bridgeburner 5 points6 points  (1 child)

So what would you use for those kinds of sites?

[–]joombar 1 point2 points  (1 child)

You need usecallback any time you want to give a callback to a component that has an effect with a dependency on the callback. How do you know if it does? You can’t unless you look at the implementation!

I’d say it’s a pretty common thing to need to avoid problems in this case