mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-30 10:13:04 +00:00
Using an object for fetch state caused re-renders even when the status
was the same, because each setFetchState({ status: 'idle' }) created a
new object reference. Now using separate primitive state variables:
- fetchStatus: 'idle' | 'fetching' | 'error'
- fetchError: string | null
React's useState does reference equality checks, so primitives only
trigger re-renders when the value actually changes.
|
||
|---|---|---|
| .. | ||
| activity | ||
| advisor | ||
| auth | ||
| dashboard | ||
| demand | ||
| invite | ||
| leadership | ||
| map | ||
| municipality | ||
| organization | ||
| shared | ||
| shell | ||
| stateDeputy | ||
| suggestion | ||
| supporter | ||
| tour | ||
| votePledge | ||