From f39ce6af3f791ba4adb47caa8e2b280ecbe04ade Mon Sep 17 00:00:00 2001 From: handtrix Date: Fri, 7 Feb 2020 16:26:50 +0100 Subject: [PATCH] Remove Head.rewind() We can get rid of .rewind by now as the latest next/head no longer uses legacy context. --- examples/with-apollo/lib/apollo.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/with-apollo/lib/apollo.js b/examples/with-apollo/lib/apollo.js index 66a27ce91294a..37f90ec690302 100644 --- a/examples/with-apollo/lib/apollo.js +++ b/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' @@ -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() } }