News for hackers. Stuff that matters.
Re:Were React hooks a mistake? by Swizec on Friday March 10, 2023 @10:30AM (#35095587)
> All of this tricky reasoning about what executed when

I may be too battle hardened, but here’s a simple rule for React: As soon as you have to reason about execution ordering, you have taken a wrong step and something is wrong.

Your code shouldn’t depend on effect ordering. Trying to do that is like trying to write code that depends on the precise ordering of thread execution in a multi-threaded program. You’re gonna have a bad time.

There are no comments on this comment yet.