Skip to content

Instantly share code, notes, and snippets.

@horacioh
Created April 1, 2018 22:38
Show Gist options
  • Save horacioh/7396b9045d760ef48ad259cb4b299c1b to your computer and use it in GitHub Desktop.
Save horacioh/7396b9045d760ef48ad259cb4b299c1b to your computer and use it in GitHub Desktop.
RN Scaffold - Root.js
// 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