Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does it have to be a HOC? #80

Open
botoxparty opened this issue Oct 2, 2020 · 0 comments
Open

Why does it have to be a HOC? #80

botoxparty opened this issue Oct 2, 2020 · 0 comments

Comments

@botoxparty
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant