Created
August 25, 2017 15:12
-
-
Save gc-codesnippets/b4253a04191b9a836bbb5af98eb4b611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const root = <QueryRenderer | |
environment={Relay.Store} | |
query={graphql` | |
query appQuery { | |
viewer { | |
...TodoApp_viewer | |
} | |
} | |
`} | |
render={({error, props}) => { | |
if (props) { | |
return <TodoApp viewer={props.viewer} /> | |
} else { | |
return <div>Loading</div> | |
} | |
}} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment