SSR Client Docs Incorrect
It looks like the client SSR documentation for the advanced setup was missing the key set for the cache. I've added this in so future users don't get stuck with a giant mystery error while following the guide (took me an hour to debug).
What:
Added missing documentation cache key for client side SSR.
Why:
The current example triggers a key not found error and breaks on the client-side.
How:
By using the current example
Checklist:
- [x] Documentation
- [ ] Tests N/A
- [ ] Code completeN/A
- [ ] Changeset N/A
⚠️ No Changeset found
Latest commit: f2b950093fc59ed241d6a15b7f03e173cbedff9c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit f2b950093fc59ed241d6a15b7f03e173cbedff9c:
| Sandbox | Source |
|---|---|
| Emotion | Configuration |
Could you tell me how the problem has manifested for you? What kind of an error have you seen or what kind of a broken behavior have you experienced? Maybe we could make this more obvious somehow. When I think about it... we already have an error in place for cases when you forget to pass the key explicitly:
https://github.com/emotion-js/emotion/blob/2bac69b6c058d007cfc190e94490c0cb225ca40c/packages/cache/src/index.js#L49-L54
Have you seen this error?
Could you tell me how the problem has manifested for you? What kind of an error have you seen or what kind of a broken behavior have you experienced? Maybe we could make this more obvious somehow. When I think about it... we already have an error in place for cases when you forget to pass the
keyexplicitly:https://github.com/emotion-js/emotion/blob/2bac69b6c058d007cfc190e94490c0cb225ca40c/packages/cache/src/index.js#L49-L54
Have you seen this error?
@Andarist That would be a much better error than I'm seeing with the missing key. Note my environment is not set to production since I set this up in dev mode for better debugging.

@Andarist I think this is good to go. If you want me to I can break off https://github.com/emotion-js/emotion/pull/2552#issuecomment-970440058 into a separate ticket.