You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you were to run the above with SSR, React will complain that there was a difference between the client and the server when rendering. The issue is that the caching key only looks at the name prop but the actual output from the cache also contains the react id which includes the key from the first Hello component. When the second Hello component is rendered with the same name but a different key, the id is incorrect.
As an FYI, I know there have been some recent changes to React to remove the id on the clientside, and I believe I recall reading somewhere that they might be able to remove the ids in SSR as well which would address this issue.
The text was updated successfully, but these errors were encountered:
Consider a simple cached component:
And usage like this:
If you were to run the above with SSR, React will complain that there was a difference between the client and the server when rendering. The issue is that the caching key only looks at the
name
prop but the actual output from the cache also contains the react id which includes thekey
from the firstHello
component. When the secondHello
component is rendered with the same name but a different key, the id is incorrect.As an FYI, I know there have been some recent changes to React to remove the id on the clientside, and I believe I recall reading somewhere that they might be able to remove the ids in SSR as well which would address this issue.
The text was updated successfully, but these errors were encountered: