emotion icon indicating copy to clipboard operation
emotion copied to clipboard

SSR Client Docs Incorrect

Open ashblue opened this issue 4 years ago • 5 comments

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

ashblue avatar Nov 14 '21 20:11 ashblue

⚠️ 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

changeset-bot[bot] avatar Nov 14 '21 20:11 changeset-bot[bot]

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

codesandbox-ci[bot] avatar Nov 14 '21 20:11 codesandbox-ci[bot]

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?

Andarist avatar Nov 16 '21 12:11 Andarist

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?

@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.

image

ashblue avatar Nov 16 '21 16:11 ashblue

@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.

ashblue avatar Nov 22 '21 20:11 ashblue