Created
April 1, 2018 22:38
-
-
Save horacioh/7396b9045d760ef48ad259cb4b299c1b to your computer and use it in GitHub Desktop.
RN Scaffold - Root.js
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
// MyApp/src/app/Root.js | |
// @flow | |
import * as React from 'react' | |
import { ApolloProvider } from 'react-apollo' | |
import App from './App'; | |
type Props = { | |
graphqlClient: any | |
} | |
// pass all the necessary config components/props (loggers, providers, stores... same as `client`) | |
const Root = ({graphqlClient}: Props) => ( | |
<ApolloProvider client={graphqlClient}> | |
<App /> | |
</ApolloProvider> | |
) | |
export default Root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment