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

feat: add test to re**produce #605 #1

Merged
merged 4 commits into from
Feb 19, 2023

Conversation

fprl
Copy link
Owner

@fprl fprl commented Feb 16, 2023

What:

This fixes a bug that assumes that tests don't run in SSR environments.

Why:

With frameworks like Next.js and Remix rendering components on the server, it's important that this library can mimic SSR environments as closely as possible.

How:

First by adding a test that reproduces the issue and then by moving this logic "into the hydrate function, so we reference document when they want it to render for real." (suggested by mpeyper).

Checklist:

  • Documentation updated
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@fprl fprl marked this pull request as ready for review February 19, 2023 23:29
@fprl fprl merged commit 27955f3 into francoromanol-fix-ssr-before Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant