Closed
feat: Add React 19 support to @ahooksjs/use-url-state#2921
Conversation
|
|
Copilot
AI
changed the title
[WIP] Add React 19 support for use-url-state
feat: Add React 19 support to @ahooksjs/use-url-state
Mar 28, 2026
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ahooksjs/use-url-state的peerDependencies未声明 React 19 支持,与主ahooks包不一致。同时补充了 react-router v7 的支持声明。[English Template / 英文模板]
🤔 这个变动的性质是?
🔗 相关 Issue
use-url-state react 19 support
💡 需求背景和解决方案
ahooks已声明支持 React 19,但@ahooksjs/use-url-state的peerDependencies仍停留在^16.8.0 || ^17.0.0 || ^18.0.0,导致用户在 React 19 项目中安装时出现 peer dependency 冲突警告。变更内容:
peerDependencies.react:添加^19.0.0peerDependencies.react-dom:添加^19.0.0peerDependencies.react-router:添加^7.0.0(react-router v7 面向 React 19)源码实现(
useRef、useMemo、React.SetStateAction)与 React 19 完全兼容,无需逻辑变更。📝 更新日志
@ahooksjs/use-url-state: Added React 19 and react-router v7 topeerDependencies@ahooksjs/use-url-state:peerDependencies新增 React 19 和 react-router v7 支持☑️ 请求合并前的自查清单
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.