It's time for modern CSS to kill the SPA

https://lemmy.ml/post/33689275

It's time for modern CSS to kill the SPA - Lemmy

Lemmy

Maybe I missed it, but how do I share state between page transitions? For instance, I’m currently displaying a user list. How do I carry the user over to the details page without re-fetching it, and more interestingly, without re-instantiating the User instance from the data?

I imagine (though I’m the first to admit that I don’t know every modern API by heart) I would have to move the user to local storage before allowing the browser to navigate. That sounds annoying, since I’m either persisting the whole user list, or I need to check which link the user clicked, prevent the navigation, store the relevant user, and then navigate manually.

With an SPA the user list just lives in a JS variable. When I’m on the user’s details page, I just find the relevant user in that list without even making another HTTP request.

SPAs are just fine.

Web dev is a never-ending cycle of people “well actuallying” constantly to invent new shit, which will be “well actuallyied” 2 weeks later.