News for hackers. Stuff that matters.
Re:React is a fractal of bad design by aelzeiny on Wednesday March 08, 2023 @10:45AM (#35070395)
> Don't use those...then an additional 4.9% can be handled with jotai...

Needing Jotai on top of React's defacto state management is the issue. TFA talks about an ecosystem of libraries that attempt to fix React's shortcomings. Pure React does have undeniable shortcomings like proper, non-brittle routing.

Re:React is a fractal of bad design by amrocha on Wednesday March 08, 2023 @12:19PM (#35071824)
I agree with you about routing. Something so core about building web apps should be treated as a first class citizen of the ecosystem.

I don't think jotai adds a lot of complexity though, and like I said most of the time you don't need it. It just makes syntax a bit nicer to read and write, but you could do it with context if you really wanted to.

Re:React is a fractal of bad design by NayamAmarshe on Wednesday March 08, 2023 @02:13PM (#35073419)
Jotai is literally like a single file.

Here's a video on how to use Jotai by writing your own in minutes: https://youtu.be/gg31JTZmFUw

Re:React is a fractal of bad design by sa46 on Wednesday March 08, 2023 @05:02PM (#35075359)
Jotai may be small and focused, but is definitely not a single file: https://github.com/pmndrs/jotai/tree/main/src/
Re:React is a fractal of bad design by NayamAmarshe on Thursday March 09, 2023 @02:12AM (#35078960)
Yes, sorry my bad, the project isn't a single file. I was just talking about the implementation.
Re:React is a fractal of bad design by alvarlagerlof on Thursday March 09, 2023 @07:00AM (#35080401)
They intentionally didn't provided that to let the ecosystem explore different solutions.