Skip to content

proposal: the bast way for check browser #4

@betula

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions