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

Cannot update a component while rendering a different component #1077

Closed
Vadorequest opened this issue Apr 3, 2020 · 5 comments
Closed

Cannot update a component while rendering a different component #1077

Vadorequest opened this issue Apr 3, 2020 · 5 comments

Comments

@Vadorequest
Copy link

Vadorequest commented Apr 3, 2020

Describe the bug
I upgraded to the latest version of react and I got warnings. I believe they come from react-i18next but ain't sure.

UnlyEd/next-right-now#27 issue is explained in main description.

Related to https://fb.me/setstate-in-render

Occurs in react-i18next version
"react-i18next": "11.3.4",

UnlyEd/next-right-now@7fd91e4

May not be related to i18n update but react instead:
UnlyEd/next-right-now@d263134

To Reproduce
Use latest react version and latest i18next version.

Or use our online demo: https://nrn-v1-ssr-mst-aptd-gcms-lcz-sty-c1-axb1uwh7s.now.sh/

Easiest way of local repro is to clone branch UnlyEd/next-right-now#27 and follow the quick start at https://unlyed.github.io/next-right-now/getting-started/quick-start (should be straightforward 3-5mn)

Expected behaviour
Shouldn't display this warning

@jamuhl
Copy link
Member

jamuhl commented Apr 3, 2020

If possible providing a codesandbox for reproduction would help a lot. Else I will update react in our repo and see if we got the same issue - currently not got the time to hunt maybe warnings.

@adrai
Copy link
Member

adrai commented Apr 3, 2020

Could not reproduce it with updated dependencies in this example: 2252592

@Vadorequest
Copy link
Author

Thank you. Then maybe it's the way my app is configured.

I guess I'll let it slide then.

@Vadorequest
Copy link
Author

@Vadorequest
Copy link
Author

Fixed by apollographql/react-apollo#3902 indeed

Released under [email protected].

The difficulty here was to locate which package the error was originating from, which is lost under the react stacktrace tree.

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

3 participants