Re:If Not React, Then What?
by Joeri on Sunday December 01, 2024 @05:03AM
(#42287448)
React isn’t that special. You can do a react-like design in many frameworks, and in fact you can even do it with vanilla web components. The code ends up a bit more verbose and ugly, but it still has that o(n) core design. To give an idea, here’s a video I made where I port react’s tic tac toe example to vanilla web code.
https://youtu.be/bhvNvQA2oqA?si=bJYZYAU8uueb-6ST
And here’s a more advanced example that preserves input field focus and uses a context: https://github.com/jsebrech/vanilla-context-and-reducer