Skip to content

components: remove defaultProps from components#336

Open
mirekys wants to merge 1 commit intoinveniosoftware:masterfrom
oarepo:mirekys/remove-defaultprops
Open

components: remove defaultProps from components#336
mirekys wants to merge 1 commit intoinveniosoftware:masterfrom
oarepo:mirekys/remove-defaultprops

Conversation

@mirekys
Copy link
Copy Markdown

@mirekys mirekys commented May 4, 2026

❤️ Thank you for your contribution!

Description

Requires:

Part of: inveniosoftware/rfcs#112

Checklist

Frontend

@mirekys mirekys force-pushed the mirekys/remove-defaultprops branch from 3ffe2e8 to 26f2d26 Compare May 4, 2026 06:56
@mirekys mirekys self-assigned this May 5, 2026
@mirekys mirekys added this to v14 May 5, 2026
@mirekys mirekys moved this to 🏗 In progress in v14 May 5, 2026
@mirekys mirekys mentioned this pull request May 6, 2026
10 tasks
label: "",
optimized: false,
children: null,
ui: null,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zzacharo @kpsherva this ui prop bugs me: it is not used anywhere in the AccordionField, passed straight to Accordion SUI component on line 180. Accordion however doesn't accept ui prop. I guess the intention was to spread the ui props to Accordion like:

const {
      label = "",
      children = null,
      optimized = false,
      includesPaths = [],
      severityChecks = null,
      ...uiProps
    } = this.props;

? This is the common pattern in other components...What do you think? Did I overlook something?

* React 18 deprecates defaultProps on function
  components, spamming the console with deprecation notices.
* Replaces `defaultProps` with ES6 default param
  syntax across affected components.

Part of: inveniosoftware/rfcs#112
@mirekys mirekys force-pushed the mirekys/remove-defaultprops branch from 26f2d26 to 699b7a1 Compare May 6, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

1 participant