rsnext/examples/with-graphql-hooks/pages/_app.js
Joe Haddad 18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00

17 lines
449 B
JavaScript

import App from 'next/app'
import React from 'react'
import withGraphQLClient from '../lib/with-graphql-client'
import { ClientContext } from 'graphql-hooks'
class MyApp extends App {
render() {
const { Component, pageProps, graphQLClient } = this.props
return (
<ClientContext.Provider value={graphQLClient}>
<Component {...pageProps} />
</ClientContext.Provider>
)
}
}
export default withGraphQLClient(MyApp)