Last active
March 21, 2018 15:25
-
-
Save jbaxleyiii/699da353d6b66def97da1144af57ba7f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Feed = () => ( | |
| <View style={styles.container}> | |
| <Header /> | |
| <Query query={GET_DOGS}> | |
| {({ loading, error, data, client }) => { | |
| if (loading) return <Fetching />; | |
| if (error) return <Error />; | |
| return ( | |
| <DogList | |
| data={data.dogs} | |
| renderRow={(type, data) => ( | |
| <Query | |
| query={GET_DOG} | |
| variables={{ breed: data.breed }} | |
| skip={true} | |
| > | |
| {({ requestQuery }) => ( | |
| <Link | |
| to={{ | |
| pathname: `/${data.breed}/${data.id}`, | |
| state: { id: data.id } | |
| }} | |
| onMouseOver={requestQuery} | |
| style={{ textDecoration: "none" }} | |
| > | |
| <Dog {...data} url={data.displayImage} /> | |
| </Link> | |
| )} | |
| </Query> | |
| )} | |
| /> | |
| ); | |
| }} | |
| </Query> | |
| </View> | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment