Skip to content

"TypeError: root is not an Object" in [email protected] #65

Closed
@hkaju

Description

@hkaju

We're trying to use react-async in a React Native project and getting an immediate red screen with TypeError: root is not an Object. This gets thrown from https://github.com/ghengeveld/react-async/blob/a1aa8231ad631b6edc98a73f2a9abdec8ed70681/packages/react-async/src/useAsync.js#L54

We've traced the issue back to https://github.com/ghengeveld/react-async/blob/a1aa8231ad631b6edc98a73f2a9abdec8ed70681/packages/react-async/src/useAsync.js#L7 that does not resolve to global for some reason. If I remove the circular reference check global.global === global the error goes away but I don't know if that's quite correct.

Looks like this was introduced in c5a4e09

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions