I've been working on a fairly simple React app as a learning process, and want to begin incorporating Flux (or, more likely, Redux) to continue the education.
The code to implement a Flux-alike solution seems fairly straightforward, but I'm a little unclear on when it's appropriate and how things should be arranged in a best-practice sense.
In ultra layman terms, my best guess at a common use case is that Flux allows components to talk to each other without having common props passed around, so with that in mind, here's an example of something I would hope to use Flux for in my app:
Let's say I have a user profile component which periodically refreshes via an ajax call. While this call is waiting for its data to be returned, a loading spinner gif displays elsewhere on the page - not in a parent or child of the component that fires the ajax call. In this scenario, how would I use Flux to prompt the spinner to display/hide at the appropriate moments (i.e. begin with the request is sent, end when a response is received)? If its visibility were defined by the profile component's state, that's easy, but obviously I need one component to communicate with what I suppose you could call a distant cousin.
How would I lay out my actions, reducers and whatnot to achieve this?
I'm not looking for anyone to write code for me here, as I'll definitely learn that better by doing it, but I'd definitely appreciate some general advice on the methodology to be used in such a situation.
Many thanks!