Skip to content

Why does it have to be a HOC?  #80

Description

@botoxparty

Hey,

So i've been working on a project that uses Next.js and Apollo client. We had some issues with page re-renders because the Apollo client was being re-instantiated on route changes.

Wrapping the App in a HOC definitely fixes the problem and I see this pattern being used for this problem everywhere online.
I'm trying to understand why this works and maybe what are the other potential solutions to a problem like this?

Thanks for your work on this package btw.

Cheers
Adam

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions