Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Use transient prop on Button to fix console warning #284

Merged
merged 3 commits into from
Mar 9, 2021

Conversation

hamstu
Copy link
Contributor

@hamstu hamstu commented Feb 10, 2021

Description

Make the loading prop transient so that React doesn't try putting it in the DOM.

I noticed this showing a warning in Publish because it was trying to pass through:
image

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style and guidelines of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated the CHANGELOG document.
  • I have added tests to cover my changes.
  • I have performed a self-review of my own code
  • I have tested my changes/additions in the latest Chrome, Firefox, and Safari.
  • I have commented my code, particularly in hard-to-understand areas
  • All new and existing tests passed.
  • I have performed the accessibility audit of my UI changes according to the accessibility doc.
  • [Buffer Engineers] Someone from the Design team reviewed and approved my changes
  • [Buffer Engineers] I have notified the BDS team of my changes in the #proj-design-system Slack channel

@hamstu hamstu requested a review from albennett February 10, 2021 23:43
@@ -83,7 +83,7 @@ const Button = ({
disabled={disabled}
type={type}
fullWidth={fullWidth}
loading={loading}
$loading={loading}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ooh, haven't seen this before!

So, we're currently using a beta version of the ui library because there were react mismatch issues. Hopefully the beta will get published soon (it's waiting on cross-team PR reviews) 🤞 In the meantime, any non-beta versions will break publish. It may make sense to wait until it gets published before doing this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, no rush TBH. Thanks for the ⏩ review though. 😄

@hamstu hamstu merged commit aa44a5d into main Mar 9, 2021
@hamstu hamstu deleted the fix-transient-prop-button branch March 9, 2021 22:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants