Skip to content

SSR support #5

@HKalbasi

Description

@HKalbasi

Accessing document in top level cause problems in server side rendering. There is one of them at util.js:43 but maybe there is more. With typeof document === 'undefined' we can find out that it code is in node or browser and don't access dom in case of node. An if (typeof document === 'undefined') return () => ({}); in the util.js should work if I understand your code correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions