Storage interview questions
Practice 4 questions on storage. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
4 questions
- JavaScriptCoding exercise
useLocalStorage
EASYImplement a useState-like hook that persists to localStorage, with SSR-safe init and cross-tab sync.
15 minPractice - JavaScriptCoding exercise
useSessionStorage
EASYImplement a useState-like hook backed by sessionStorage, with a graceful fallback when it is unavailable.
15 minPractice - JavaScriptCoding exercise
localStorage With Expiry
MEDIUMImplement a localStorage wrapper that stores values with a TTL and returns null once an entry has expired.
25 minAnthropic · ByteDance · Coinbase +2Practice - JavaScriptCoding exercise
useCookieState
MEDIUMImplement a useState backed by a cookie — state the server can also write, with no event when it does.
25 minPractice