- Refactor useFavorites callbacks to read latest state instead of closing over stale favorites values - Ensure add/remove/toggle flows update local state and persistence from a consistent source of truth - Add regression tests that reproduce stale-closure timing scenarios and verify favorites remain correct - Expand hook test coverage for rapid consecutive updates to guard against future closure regressions
3.1 KiB
3.1 KiB