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

Support for React 19 #2670

Open
dgtllion opened this issue Nov 8, 2024 · 2 comments
Open

Support for React 19 #2670

dgtllion opened this issue Nov 8, 2024 · 2 comments

Comments

@dgtllion
Copy link

dgtllion commented Nov 8, 2024

is there a plan to make ahooks work with React 19?
When i try to upgrade to React 19 with pnpm i get warning that package is not supporting React 19.

├─┬ ahooks 3.8.1
  └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0-rc-66855b96-20241106

@zhe-he
Copy link

zhe-he commented Dec 6, 2024

When I forcibly installed react@19 and react-dom@19 using --force, it works, but the console shows the following warning:

Accessing element.ref was removed in React 19. ref is now a regular prop.
It will be removed from the JSX Element type in a future release.

@danni-boii
Copy link

Currently, my solution is to add the overrides attributes under package.json to support selective version overrides.

Example

{
  "overrides": {
    "ahooks": {
      "react": "$react",
      "react-dom": "$react-dom"
    }
  }
}

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

3 participants