's Avatar

@deivshon

19
Followers
102
Following
1
Posts
02.11.2024
Joined
Posts Following

Latest posts by @deivshon

You may not like it, but React is basically Haskell. 

The React Compiler works for the same exact reason that compilers for pure programming languages are able to make non-trivial optimizations.

If your code is composed of pure functions, it is safe to re-order their computation, or save the result for some inputs and reuse it for later for same inputs.  This is not some kind of a “workaround” or a hack — it’s one of the most exciting consequences of the functional programming paradigm which has been known and used for decades.

Purity and idempotency make it safe to move stuff around without changing the final outcome. Following the "rules of React" is just ensuring your code is safe to move around like this.

You may not like it, but React is basically Haskell. The React Compiler works for the same exact reason that compilers for pure programming languages are able to make non-trivial optimizations. If your code is composed of pure functions, it is safe to re-order their computation, or save the result for some inputs and reuse it for later for same inputs. This is not some kind of a “workaround” or a hack — it’s one of the most exciting consequences of the functional programming paradigm which has been known and used for decades. Purity and idempotency make it safe to move stuff around without changing the final outcome. Following the "rules of React" is just ensuring your code is safe to move around like this.

i think the @react.dev Compiler team could include more of this type of messaging. i'm being a bit inflammatory here (and Haskell may not the best analogy), but the principle of "pure things are safe to move around" is fundamentally simple and has been known for decades. teach it to new generation!

11.10.2025 12:14 👍 233 🔁 22 💬 10 📌 6

For the love of all that is holy, platform XYZ, I do *not* want to set up a passkey! Stop asking each time I login from a different browser!

21.06.2025 22:25 👍 0 🔁 0 💬 0 📌 0

"Framework" semantics get in the way of progress way too much with React and I'm really tired of the "you must be this tall" narative from react.dev. Tools that drastically aid you to be productive with React deserve a seat at the table. Vite is just the obvious start among many other tools.

24.01.2025 22:44 👍 317 🔁 22 💬 11 📌 5