State Management · Senior · Question 62 of 75
How do you show a global indicator for all in-flight React Router fetchers (e.g. several "like" buttons)?
- ✓Correct answer: Read them with
useFetchers()and check their states - 2Keep a counter in a global store incremented in each button
- 3It isn't possible - fetchers are private to their component
Explanation
useFetchers also enables optimistic UI from anywhere, e.g. a list reflecting pending deletions triggered from detail panels.