reactjs - Pass loading state props to root component with Relay -


this seems basic idea can't seem wrap head around it.

in redux, defining happens store , props pass components entirely me. in relay, can define render function in container return component based on ready state. want 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 , relay, , imagine there's 'relay way' of doing this.


Comments