News for hackers. Stuff that matters.
Re:A Visual Guide to UseEffect by cageface on Tuesday December 27, 2022 @05:57AM (#34147557)
If you have to document 12 wrong ways to use your API that's a sign that it's not well designed.

React was a breath of fresh air when it first arrived and I'm grateful to it for rekindling my interest in front end javascript but the cracks are starting to show. It's just way too hard to write correct, performant React code. I daily see veteran programmers with years of React experience under their belt surprised and confused by the way their React code is behaving.

Re:A Visual Guide to UseEffect by andix on Tuesday December 27, 2022 @06:37AM (#34147809)
I disagree. The awesome thing about react is it’s simplicity. Hooks can be compared to Rxjs from the angular world. That’s really complicated. I’m working with Rx for over 10 years now, and I’m nearly every time overwhelmed. React makes the concept of reactive programming really easy and accessible. But it’s still something complicated, and it will take people time to learn.

Doing those things is not completely wrong, there is just a better/easier solution.

Re:A Visual Guide to UseEffect by tipiirai on Wednesday December 28, 2022 @01:38AM (#34158151)
> If you have to document 12 wrong ways to use your API that's a sign that it's not well designed.

This is so true.