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

proposal: the bast way for check browser #4

Open
betula opened this issue Dec 13, 2022 · 0 comments
Open

proposal: the bast way for check browser #4

betula opened this issue Dec 13, 2022 · 0 comments

Comments

@betula
Copy link
Member

betula commented Dec 13, 2022

export const canUseDOM = !!(
  typeof window !== "undefined" &&
  typeof window.document !== "undefined" &&
  typeof window.document.createElement !== "undefined"
);

https://github.com/molefrog/wouter/blob/5533ed0e4e776f484bbf6bd95e8134fe1554ffe7/react-deps.js

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

1 participant