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

React Warning: Prop id did not match. Server: "rw_*_notify_area" Client: "rw_1_notify_area" #781

Closed
BigPrimeNumbers opened this issue Apr 6, 2018 · 2 comments

Comments

@BigPrimeNumbers
Copy link

BigPrimeNumbers commented Apr 6, 2018

Getting this warning from my isomorphic app using React 16.3.1 when using the multiselect widget, where the * is the an integer representing the number of times one has refreshed a page that includes the widget. No other warnings from other widgets/components.

This seems to only occur if the widget is not given any id.

@jquense
Copy link
Owner

jquense commented Apr 6, 2018

yeah, this is because we can't generate id's in a order that work automatically with React SSR, there is a note about in the docs (tho admittedly not in an obvious place)

Note: Because of how server-side rendering works, using auto generated ids may cause checksum mismatches. Always provide id props to your components to avoid this possible pitfall.

Feel free to 👍 this RFC as well, which would eliminate this problem: reactjs/rfcs#32

@BigPrimeNumbers
Copy link
Author

I've added my support to this request. Hopefully they add this support to React in the (near) future.

@jquense jquense closed this as completed Mar 31, 2021
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

2 participants