This seems like a basic idea but I can't seem to wrap my head around it.
In Redux, defining what happens to the store and which props I pass to components is entirely up to me. In Relay, I can define a render
function in my container where I return a component based on the ready state. What I really want would look something more like:
render({ props }) {
if (!props) store.dispatch(toggleSpinner(true))
else {
store.dispatch(toggleSpinner(false))
return <Container {...props} />
}
}
Then in whatever component:
<Spinner show={props.spinnerIsShowing) />
..but of course I'm not mixing redux and relay, and I imagine there's a 'relay way' of doing exactly this.