Chad Curtis be5249b67d Fix first-click toggle reset from stale closure in useLocalStorage
useLocalStorage's setValue captured 'state' at closure-definition time.
When multiple updateConfig calls fired before a re-render (e.g. NostrSync
and useInitialSync both calling updateConfig on startup), each call's
functional updater received the same stale state snapshot instead of the
accumulated result of previous calls — so later writes silently discarded
earlier ones.

Fixed by using React's built-in functional setState form (setState(prev =>
...)) which always receives the true current state from React's queue,
making all sequential updateConfig calls chain correctly regardless of
render timing.
2026-02-24 20:27:18 -06:00
2026-02-16 16:54:01 -06:00
2026-02-22 16:35:53 -06:00
S
Description
Activist social network and fundraising platform on Nostr
AGPL-3.0 43 MiB
Languages
TypeScript 95.7%
Java 1.5%
JavaScript 0.9%
Swift 0.9%
CSS 0.5%
Other 0.4%