Skip to content

Instantly share code, notes, and snippets.

@immortalx
immortalx / _app.tsx
Created September 22, 2019 17:11
nextjs withApollo _app
import { ApolloProvider } from '@apollo/react-hooks'
import App from 'next/app'
import React from 'react'
import withApolloClient from './lib/with-apollo-client'
class MyApp extends App {
render () {
const {Component, pageProps, apolloClient}: any = this.props
return(
<ApolloProvider client={apolloClient}>