a8afb9cd58145657d1fa97457ffcb56ec11bfc17
The follower-rsvps query was unreliable due to: 1. Stale closure: followedPubkeys was captured at render time but the queryKey only included the user pubkey, not the actual follow list. When the follow list loaded asynchronously, the queryFn could run with an empty or stale array. Now the queryKey includes a stable hash of the first 20 followed pubkeys so it re-runs when the follow list actually changes. 2. followedPubkeys defaulting to []: when followData was undefined (still loading), the default [] made hasFollows false, but on the next render when followData arrived, the query might not re-fetch because the stale cached result from the empty run was returned. Now followedPubkeys is undefined until loaded, and isReady properly gates the query. The React warning about setState during render in useLayoutOptions is a known pattern used by all pages and is not specific to EventsFeedPage.
Description
Languages
TypeScript
95.7%
Java
1.5%
JavaScript
0.9%
Swift
0.9%
CSS
0.5%
Other
0.4%