-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Select doesn't render isomorphically #1120
Comments
Also want to point out that the |
https://github.com/JedWatson/react-select/blob/master/src/Select.js#L25 This var gets persisted statically as the application is running on the server, which is no good - as it should be reinitialized with every request. Could this simply be changed to an instance variable? |
I'm still getting this on "react-select": "^1.0.0-rc.2", What am i missing?
|
I'm getting the same error as @mattbroekhuis |
Hi, Sorry to post on a closed issue but I still have the same issue (like @Peterabsolon and @mattbroekhuis). The fix on the instance variable doesn't seem to be enough.I'm on Is it possible that the runtime used for server-side rendering could affect the persistance? I am using v8 |
Interestingly I'm only getting this error in development, with transpiled production version of the code the error is not there |
@mattbroekhuis I am getting the exact same error. Did you manage to solve it? @Peterabsolon You don't get the error in production because React shows warnings only when NODE_ENV is set to development. |
I did not. Ended up removing the lib and solving it a different way. It just kept cropping up randomly and I was spending too much time on it.
|
Set the instanceId: |
@jarsbe that doesn't solve the problem for me. |
I am seeing this error too.
|
See also #1297 |
Is there any intention to address this issue in the future? |
Use |
It works! This should be in the documentation. |
Just installed the version: 1.0.0-rc.2 I receive 2 warnings and an error: Warnings:
Error:
Any update, news, something, to solve this quickly? |
Both of those warnings are fixed in the latest version (1.0.0-rc.10 if I recall correctly). I'm not sure off hand about the error but I don't think I've experienced that problem. Like @idangozlan mentioned, you should set the |
Hello,
If I render this server side first, and then attach client side, like is done here:
https://github.com/mhart/react-server-example
You get a checksum error:
warning.js:44 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) r" id="react-select-2--value" data-react
(server) r" id="react-select-4--value" data-react
I think it is to do with the way the instancePrefix is being generated here:
https://github.com/JedWatson/react-select/blob/master/src/Select.js#L155
Could an option be added to set the instance id so it works isomophically?
The text was updated successfully, but these errors were encountered: