You have to be ok with not getting state back if the user is using a different device or browser, but then again, that's always true unless you've actually made some kind of server-side account system. (Which also has UX implications, in terms of a lot of people have "make an account to use this fatigue". And also "link to my FB account" fatigue.)
Anyway, window.localStorage; it's just sitting there, waiting for you, with old Old Skool messing with cookies.
or you can even use array-like syntax:
The only caveat it is many or all browsers will coerce your data to a string, so most likely you want something like
someThing = JSON.parse(localStorage.getItem("someKey"));
(with an appropriate safety checks)