Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
thayne
· 4y ago · 0 comments
For it to persist across refreshes you would need to do more than just mutate the object, you would need to actually write it back to a persisted location like localstorage or a cookie.
Comments
[–]
staticassertion
4y ago
I'm sure there are a billion frameworks that persist state automatically for you exactly like that.
[–]
IanCal
4y ago
That seems like the kind of assumption that could cause this kind of bug.
I
don't need to do that, just the layers under.