React 18 Enhancements: Refactor defaultProps to default function parameters #13424
Labels
package: @carbon/react
@carbon/react
package: icons-react
@carbon/icons-react
package: pictograms-react
@carbon/pictograms-react
planning: umbrella
Umbrella issues, surfaced in Projects views
role: dev 🤖
type: infrastructure 🤖
Issues relating to devops, tech debt, etc.
Milestone
React 18.3 will introduce a deprecation of defaultProps. Components will need to move off defaultProps and instead use default function parameters.
Additionally, we'll need to ensure that default values are static #10777 - this mostly includes function props
We probably should wait to tackle this until React 18.3 lands to see if the react team has additional recommendations for this work and/or a codemod available to automate this refactor.
// TODO: provide code example
Components to refactor
The text was updated successfully, but these errors were encountered: