4 ms·
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
by Joeri 2y ago
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 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 https://github.com/jsebrech/vanilla-context-and-reducer