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

fix(components): use typeof document #2025

Merged
merged 1 commit into from Feb 18, 2022
Merged

fix(components): use typeof document #2025

merged 1 commit into from Feb 18, 2022

Conversation

kentcdodds
Copy link
Member

@kentcdodds kentcdodds commented Feb 18, 2022

typeof window isn't a good way to determine whether you're running on the server thanks to Deno supporting a global window. So this updates all our code/examples to use typeof document instead. This PR also adds a note about this in the gotchas page.

I've added support for "good" in our code blocks on the website repo as well so you can now have "bad" and "good" code blocks :)

image

image

  • Docs

@kentcdodds kentcdodds merged commit c1adcc6 into main Feb 18, 2022
@kentcdodds kentcdodds deleted the kent/typeof-checks branch February 18, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants