News for hackers. Stuff that matters.
Re:A Visual Guide to UseEffect by fexecve on Tuesday December 27, 2022 @12:42AM (#34145512)
> This "3rd party library by default" bullshit is killing me

I've noticed that new developers tend to think of libraries are indivisible units. They never stop to think what React Query uses, it's an atomic unit that you use to do queries, duh.

Re:A Visual Guide to UseEffect by ben0x539 on Tuesday December 27, 2022 @06:09AM (#34147627)
Isn't this like the whole point of abstractions? Sure they don't last forever but still.
Re:A Visual Guide to UseEffect by fexecve on Thursday December 29, 2022 @05:28AM (#34171272)
Well, yes, but new developers need to learn to always delve one layer beneath any abstraction they're using, and understand it. Usually they learn this the hard way by fighting with some abstraction until in a fit of insanity they dig beneath the surface (looking at the library source code or something) and realize that either (a) the docs were lying or (b) the code has a bug or (c) their understanding of what the abstraction was even capable of was wrong.
Re:A Visual Guide to UseEffect by Rapzid on Tuesday December 27, 2022 @06:59AM (#34147917)
Yeah well React's "custom hooks" documentation doesn't help matters.

In reality React doesn't expose public APIs for creating your own useEffect; just the base hooks you can compose into "composite" hooks.