Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Imagine trying to do that with a React app.

It'd work fine if the developer used the URL to maintain state with React Router's BrowserRouter or HashRouter.



view as:

In other words, not by default.

No, but even back in 1996 you didn't have to use the URL to store the state of a user's game. They could have used a cookie (supported in Mosaic since around 1994), or used a server-side session (I think was cgi::session a thing back then). That was a technical decision someone made. Those sorts of choices when you're speccing a web app haven't changed.

These days it would be a bit unusual to use routing to store the game state admittedly but that's why it's good to have older devs like 43-year-old me on the team. I actually think about these sorts of details rather than using the defaults.

It's also worth noting that storing the state in the URL shouldn't be the default. Being able to see the state by reading the address bar would be a security issue for most apps.


The elegance of using a static URL is that you are not really keeping the state - you instantiate all possible states and let the user traverse them according to whatever state they happen to be in (and able to see).

There is no spoon.


All thats wrong with the modern web is in this answer.

Probably 3/4s of the people who post on HN can attribute their entire career existing to "the modern web", so maybe there's some good things as well as bad things about it.

I believe some of the conceptual simplicity of the "olden web" is missing in the age of leftpad.

"My career exists because of it" isn't a great argument for its actual merit.

Legal | privacy