usdevs / usc-website-hackathon-frontend

Prototype frontend
https://usc-website-hackathon-frontend.vercel.app
3 stars 4 forks source link

State management #76

Open parth-io opened 1 year ago

parth-io commented 1 year ago

//todo simplify this stuff, why is defaultValue being passed to FetcherFn //todo we don't even need this lib, just use SWR itself directly //todo use git submodules instead if you want to keep using this lib, so upstream changes are tracked - see git // commit history for this file to see how this file diverged from original lib over time

//fixme note that this gets refreshed every 1 day, refactor all of the stuff related to data caching and hooks and swr together

//fixme actually this invalidates auth token after 5 min, not 20, see refreshInterval: 5 60 1000 in useLocalStorage // why 20 min? token is valid for 1 hour on backend - to check //todo after 20 min or after 1 hour, re-authenticate and get new token and update it

//todo to explore browser storage: Local Storage, Session Storage, Cookie, IndexedDB and WebSQL
zsh-eng commented 1 year ago

@parth-io Could you give a bit more details on this issue? Thanks!