3 ms·
> If you're just serving templated html from a backend, you're probably also doing vanilla javascript which is it's own kind of hell. How so ? Vanilla JS has n
by JodieBenitez 2y ago
> If you're just serving templated html from a backend, you're probably also doing vanilla javascript which is it's own kind of hell.
How so ? Vanilla JS has never been easier and more powerful.
> How do you pass state between two pages?
Why is it even considered to be a problem ? This is basic stuff. All web frameworks since the 90s have had this concept of sessions where you can store data that will be available across pages.
- shortrounddev2 2y agoVanilla js is unstructured. It's very easy to write spaghetti code with vanilla js. Sessions are a kind of global state. I mean temporary state, like when filling out a form and moving from one page to the other, but without submitting the results until the end.
- JodieBenitez 2y ago> Vanilla js is unstructured. Functions, classes, modules... everything is available to organize code. The mess some programmers make can be unstructured, but that's the case with any paradigm and yes, we've seen that with "modern" JS frameworks too. Spaghetti mess, lasagna mess, components mess or whatever pasta mess. > I mean temporary state What is the problem here ? It's as temporary as you need it to be.
- shortrounddev2 2y agoTemporary state does not need need to be sent to the server, it can be managed in localstorage