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

Detected multiple renderers concurrently rendering the same context provider #183

Open
bohdanbirdie opened this issue Jun 8, 2022 · 6 comments

Comments

@bohdanbirdie
Copy link

Trying out the next-with-apollo resulted in warning about multiple renderers
Is this expected?
Also, is the library still maintained?

image

"next": "12.1.6",
 "next-with-apollo": "^5.3.0",
@nilu2039
Copy link

having the same issue, did u find any solution?

@bohdanbirdie
Copy link
Author

@nilu2039
no, I gave up
This seems to be the problem with the package because it renders the first time to collect the nested queries, and the second time when all queries are resolved - render with the cached data

Overall, I did not find any way to use apollo client with Next (or any other SSR solution) where we could still benefit from the features of the apollo

@nilu2039
Copy link

@bohdanbirdie
I think the issue is with "getDataFromTree" from apollo because I used a different package "https://github.com/adamsoffer/next-apollo" and it had the same issue.

@imCorfitz
Copy link

imCorfitz commented Jul 10, 2022

This seems to be due to the version of React. If running React 17.0.2, this error does not appear in the terminal, but after upgrading to React 18, I am experiencing same as OP.

However, as it is only considered a "Warning" it shouldn't impact your application. For more information: facebook/react#22796

@moshest
Copy link

moshest commented Jul 28, 2022

I think it's solvable if we use primary and secondary renders: facebook/react#19519

@moshest
Copy link

moshest commented Aug 9, 2022

There are some workarounds here, but I haven't tried it yet: apollographql/apollo-client#8365

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

4 participants