Top
Best
New

Posted by thm 2 days ago

URLs are state containers(alfy.blog)
492 points | 212 commentspage 7
alex_duf 2 days ago|
Any blob of byte is a state container
nathsav 2 days ago||
you can save so much data in the url, I like how pocketcal.com stores the calendar informations
moralestapia 1 day ago||
Yes, but keep it less than 1024 chars in length.
naasking 1 day ago|
Wasn't IE6 the worst offender here? I think URL lengths can be longer now, although I doubt 4096 chars is portable.
ronreiter 2 days ago||
Duh :)
ratelimitsteve 1 day ago||
is this not a basic rest principle? URLs and req/res bodies are the only way to transfer anything so they must be the way to transfer state
righthand 1 day ago||
It’s kind of nuts this even has to be explained. I had a coworker I’ve been trying to teach good application design and React state is the first “crap bucket” he always reaches for. I had to explain to him, “when we put values in the Url we don’t need to use state, because everything is already stored right?” “Uhhh sure fine go ahead and change it.”

But what bugs me about it is that this isn’t even that novel or intelligent of a realization. If you’ve used a web browser you’ve seen the url change. Connecting that with putting values in the url shouldn’t be such a huge leap. This was for a simple search page.

How do I stop this sort of brain dead unrealized thinking?

unit149 1 day ago||
[dead]
kgwxd 2 days ago|
[flagged]