I'm on www.neetcode.io, and I realized that it saves my progress. However, when I check my local storage, I don't see any state. I also haven't signed in, so there is no "state" of mine saved in some db that the site fetches. Does anyone know how the state is persisted on re-visit / refresh?
1 Answer
It is using local storage. Tick a checkbox, then open a console and type localStorage["completed-problem-list"].
localStorage["completed-problem-list"]
// Output:
> '{"Arrays & Hashing":["https://leetcode.com/problems/contains-duplicate/"]}'
You can also check local storage by tabbing over to the "Application" tab of Chrome Dev Tools, then click the dropdown menu next to "Local Storage" (not the item itself, which is arguably confusing), then "https://neetcode.io/".
1 Comment
samplecode3300
Weird, ok that’s the first thing I tried to check was the local storage but I didn’t see anything there.