Skip to content

move defaultProps to function defaults - #2759

Merged
manuelpuyol merged 20 commits into
mainfrom
remove-default-props
Jan 23, 2023
Merged

move defaultProps to function defaults#2759
manuelpuyol merged 20 commits into
mainfrom
remove-default-props

Conversation

@manuelpuyol

@manuelpuyolmanuelpuyol commented Jan 10, 2023

Copy link
Copy Markdown
Contributor

I'm updating all non-deprecated components that use defaultProps to stop using it and using function defaults instead.
As described in the issue below, defaultProps is going to be deprecated so it'd be nice to be clear of it before the new React version is released.

Closes#2758

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot

changeset-botBot commented Jan 10, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ad06caa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 10, 2023 17:27 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 10, 2023 17:30 Inactive
@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 10, 2023 17:33 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 10, 2023 17:34 Inactive
@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 10, 2023 18:11 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 10, 2023 18:12 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 16:55 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 16:59 Inactive
@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 12, 2023 17:02 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 17:02 Inactive
@github-actions

github-actionsBot commented Jan 12, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js88.96 KB (+0.04% 🔺)
dist/browser.umd.js89.56 KB (+0.03% 🔺)

@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 12, 2023 17:11 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 17:12 Inactive
@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 12, 2023 17:40 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 17:41 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 21:00 Inactive
@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 12, 2023 22:12 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2759 January 12, 2023 22:12 Inactive
@manuelpuyol
manuelpuyol marked this pull request as ready for review January 12, 2023 22:21
@manuelpuyol
manuelpuyol requested review from a team and JoshBowdenConceptsJanuary 12, 2023 22:21
@joshblackjoshblack added the 💓collab a vibrant hub of collaboration label Jan 18, 2023
@joshblack
joshblack requested review from broccolinisoup and colebemis and removed request for JoshBowdenConceptsJanuary 18, 2023 17:15

@colebemiscolebemis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@broccolinisoupbroccolinisoup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@manuelpuyol
manuelpuyol enabled auto-merge (squash) January 23, 2023 16:32
@manuelpuyol
manuelpuyol enabled auto-merge (squash) January 23, 2023 16:32
@colebemis
colebemis temporarily deployed to github-pages January 23, 2023 17:00 — with GitHub Actions Inactive
@github-actions
github-actionsBot requested a deployment to storybook-preview-2759 January 23, 2023 17:02 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-2759 January 23, 2023 18:32 Inactive
@manuelpuyol
manuelpuyol merged commit 693ce68 into mainJan 23, 2023
@manuelpuyol
manuelpuyol deleted the remove-default-props branch January 23, 2023 18:36
@primer-cssprimer-css mentioned this pull request Jan 23, 2023
@manuelpuyol
manuelpuyol temporarily deployed to github-pages January 23, 2023 18:45 — with GitHub Actions Inactive
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💓collaba vibrant hub of collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor components to stop using defaultProps

4 participants

@manuelpuyol@broccolinisoup@colebemis@joshblack