3 ms·
> 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 e
by Swizec 4y ago
> 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.