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

📄 Remix browser check not ideal #10

Closed
HurricanKai opened this issue Mar 28, 2022 · 1 comment
Closed

📄 Remix browser check not ideal #10

HurricanKai opened this issue Mar 28, 2022 · 1 comment

Comments

@HurricanKai
Copy link

Remix actually suggests to check for document instead of window due to deno supporting window
see the official docs
I've noticed the window check in the docs, not sure whether its also an issue in the code itself. (Coincidentally the latest commit also mentions a typeof window check 😛)

@0Lola
Copy link

0Lola commented Mar 28, 2022

Thanks for your reminder.

  1. typeof window !== 'undefined' already fixed at 1.3.0.
  2. It seems just need to import '@master/styles' in entry.client.tsx.
import { hydrate } from "react-dom";
import { RemixBrowser } from "remix";

import '@master/styles';
hydrate( <RemixBrowser />, document);

It's works, we will update docs soon.

Better suggestions are welcome. 🥳

@0Lola 0Lola closed this as completed Mar 29, 2022
@1aron 1aron changed the title Remix browser check not ideal 📄 Remix browser check not ideal Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants