Refactor ReactNode renderability guards across rc-components
Author: QDyanbingCreated Sep 2, 2026Updated Sep 28, 2026
Labels👷🏻♂️ Someone working on it
Reproduction link
https://github.com/react-component/cascader/pull/664
Steps to reproduce
- Audit rc-components for truthy or handwritten null checks applied to ReactNode values.
- Compare the guards with @rc-component/util isReactRenderable and isNonNullable semantics.
- Migrate only display guards whose intended behavior matches the shared helpers.
What is expected?
ReactNode display checks use shared @rc-component/util helpers consistently, including support for numeric zero, and each affected package declares a compatible minimum util version.
What is actually happening?
Several rc packages still use local truthy or handwritten null checks, which makes renderability boundaries inconsistent and may omit valid numeric zero content.
| Environment | Info |
|---|---|
| antd | unknown |
| React | 19.2.8 |
| System | darwin 25.6.0 |
| Browser | - |
用于集中跟踪多个 rc-components 仓库的迁移工作。
相关 PR:
- https://github.com/react-component/cascader/pull/664
- https://github.com/react-component/collapse/pull/455
- https://github.com/react-component/input/pull/203
- https://github.com/react-component/input/pull/205
- https://github.com/react-component/input-number/pull/753
- https://github.com/react-component/input-number/pull/756
- https://github.com/react-component/menu/pull/894
- https://github.com/react-component/menu/pull/897
- https://github.com/react-component/notification/pull/410
- https://github.com/react-component/overflow/pull/71
- https://github.com/react-component/overflow/pull/73
- https://github.com/react-component/picker/pull/1009
- https://github.com/react-component/select/pull/1252
- https://github.com/react-component/select/pull/1254
- https://github.com/react-component/steps/pull/397
- https://github.com/react-component/steps/pull/399
- https://github.com/react-component/table/pull/1511
- https://github.com/react-component/table/pull/1516
- https://github.com/react-component/tabs/pull/1021
- https://github.com/react-component/mentions/pull/337
- https://github.com/react-component/slider/pull/1094
- https://github.com/react-component/dialog/pull/587
- https://github.com/react-component/pagination/pull/721
- https://github.com/react-component/pagination/pull/723
- https://github.com/react-component/image/pull/532
- https://github.com/react-component/image/pull/534
- https://github.com/react-component/tree/pull/1073
- https://github.com/react-component/tree/pull/1077
- https://github.com/react-component/tree-select/pull/689
- https://github.com/react-component/tour/pull/112
- https://github.com/react-component/mutate-observer/pull/39
- https://github.com/react-component/tooltip/pull/546
迁移时需区分 ReactNode 展示判断与普通布尔状态判断,并将 @rc-component/util 最低版本同步提升到包含 helper 的 ^1.13.0。
Generated by @ant-design/cli
Source: ant-design/ant-design