react-component / react-component/util

v5.25.0 对 useMergedState 的重构, 导致rc-picker@2.6.11重复render, 页面卡死

Open
#393 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
670
Forks
205
Avg merge
11d 17h
Merged PRs (30d)
4

Description

rc-util 5.25.0版本及之后版本, 会导致 rc-picker 特定场景卡死

rc-picker 依赖关系
image

rc-util 产生问题的commIt: 832a397699059fb2ecf852a874e305904119a103

复现路径描述:

  1. disabled 有两个不一致的值
    <RangePicker
    disabled={[false, true]}
    />

问题表象:
image
image

暂时解决方案:
yarn 依赖版本锁定
"resolutions": {
"rc-util": "5.24.8"
},

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the useMergedState refactor at commit 832a397699059fb2ecf852a874e305904119a103 and compare it with rc-util 5.24.8. Reproduce the issue using rc-picker's RangePicker with disabled={[false, true]}, then trace the repeated renders and confirm that the page no longer locks up with rc-util 5.25.0 or later.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.