StateManagement
Local component state vs global state vs server state (React Query/SWR) — where each belongs.
Why we need this / what value this brings
Using the wrong tool for a given kind of state (e.g. useState for server data) leads to stale data bugs and unnecessary re-fetching logic.
When to use this
Local UI state → component state; data from the server → a server-state library (React Query/SWR), not manually managed state.
How to use or implement this
Audit whether booking/listing data fetching uses a server-state library with caching/revalidation, or manual fetch+useEffect that reinvents it poorly.
Research questions
- Is Localz using React Query/SWR for server state, or plain useEffect+fetch? Worth auditing given the amount of booking/listing data fetched.
Empty folder — drop notes, links, and findings here as you research.