Back to all reviewers

Update deprecated demo APIs

ant-design/ant-design
Based on 4 comments
Other

Documentation, demos, and example code should always use current, non-deprecated APIs instead of showing deprecation warnings. When APIs are deprecated, update all demo code and examples to use the recommended replacement APIs immediately.

API Other

Reviewer Prompt

Documentation, demos, and example code should always use current, non-deprecated APIs instead of showing deprecation warnings. When APIs are deprecated, update all demo code and examples to use the recommended replacement APIs immediately.

This prevents users from copying outdated code that generates warnings and ensures documentation serves as a reliable guide for current best practices. If deprecated API compatibility testing is needed, limit it to dedicated test files rather than user-facing examples.

Example of what to avoid:

// Bad: Demo showing deprecated API usage
<Alert onClose={handleClose} /> // Generates warning

// Good: Demo using current API
<Alert closable= />

When you see deprecation warnings in demo snapshots, update the demo source code to use the current API rather than accepting the warning as expected output.

4
Comments Analyzed
Other
Primary Language
API
Category

Source Discussions