Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How has nobody mentioned the insane complexity monster that is React 18 / Suspense?! I mean, it makes sense once you understand it, but who is going to understand it?

React's concurrency features should have been broken off into a separate, opt-in library, not packaged into React core, and they sealed their own coffin with this release. That said, suspense is awesome once it's fully understood. Give the public a few more years to get it, though.



suggesting the concurrency features can simply be broken off is evidence that you may not understand them as well as you imply.


Sorry, to clarify: What I'm suggesting is that React 18's changes were substantial enough to have been broken off into a separate library, not maintained inside of React. I don't mean to diminish the teams amazing work here, but they're overkill for 90% of the developer community who are already having a hard time understanding all of the abstractions that have made it in since hooks were added. All of this is _overwhelming_ given how simple React was at one point in time.


Amen. React 18 was the moment where they forgot they started as the V in MVC.

Concurrent React was a mistake, and the hooks they had to add to make it work too.

The main example I always cite of where the React team is naive is mousemove handlers:

- there is no guarantee that react will re-render between two mousemove events

- even if it did, creating a new mousemove handler after every move is ridiculous

- avoiding this using the `setState(s => s)` form doesn't work if you have multiple pieces of state or need to invoke other callbacks

Therefore, every mouse dragging UI I've built has used useRef instead, mutating state directly.

The answer from the react team to this seems to be.... nothing. They just say it's bad to mutate state and that it will lead to bugs, seemingly not realizing that so will useEffect for the reasons above.

I think OP is wrong, and that people who have never built an app with undo/redo don't know what they're talking about when it comes to front end dev... but the React team is definitely chasing the wrong ideas.

Also, forms utterly suck as a UI, and every form abstraction I've ever used was terrible and ran into a wall. It just seems pointless to try to optimize for it.

If some people want to make forms easier because it's most of what they do day to day... hint, they're atrocious front end developers.


> Amen. React 18 was the moment where they forgot they started as the V in MVC.

Yep, exactly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: