Skip to content

Use with React 19 fails with error "Cannot read properties of undefined (reading 'ReactCurrentOwner')" #1187

@ryleyrandall22

Description

@ryleyrandall22

Describe the bug
When using the library with a default config, the following error is thrown "Cannot read properties of undefined (reading 'ReactCurrentOwner')". This looks like a piece from React internals that was removed in react 19. This appears to be a common issue with apps in React 19. Interestingly, NextJS uses this as well so the must patch the change.

To Reproduce
https://stackblitz.com/edit/github-2amsyj?file=package.json

Misc

  • Node version:20.18
  • Package manager:PNPM
  • Browser: Chrome
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions