Skip to content

Commit

Permalink
Remove Head.rewind()
Browse files Browse the repository at this point in the history
We can get rid of .rewind by now as the latest next/head no longer uses legacy context.
  • Loading branch information
HaNdTriX committed Feb 7, 2020
1 parent 04dffc4 commit f39ce6a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions examples/with-apollo/lib/apollo.js
@@ -1,6 +1,5 @@
import React from 'react'
import App from 'next/app'
import Head from 'next/head'
import { ApolloProvider } from '@apollo/react-hooks'
import createApolloClient from '../apolloClient'

Expand Down Expand Up @@ -153,10 +152,6 @@ export const withApollo = ({ ssr = false } = {}) => PageComponent => {
// https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-error
console.error('Error while running `getDataFromTree`', error)
}

// getDataFromTree does not call componentWillUnmount
// head side effect therefore need to be cleared manually
Head.rewind()
}
}

Expand Down

0 comments on commit f39ce6a

Please sign in to comment.