Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove key prop pass-thru on HeaderButton #5137

Merged
merged 2 commits into from
Sep 28, 2017

Conversation

lukebarnard1
Copy link
Contributor

This is redundant and throws a warning

This is redundant and throws a warning
key={this.props.key}
onClick={ this.onClick }
>
return <AccessibleButton className="mx_RightPanel_headerButton" onClick={ this.onClick } >
Copy link
Member

Choose a reason for hiding this comment

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

trailing space before > :(

Copy link
Member

Choose a reason for hiding this comment

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

plus I feel like you at one point told me props get no space padding within {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is true, I've added an eslint rule for this - matrix-org/matrix-react-sdk#1436

Copy link
Member

Choose a reason for hiding this comment

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

:D

key={this.props.key}
onClick={ this.onClick }
>
return <AccessibleButton className="mx_RightPanel_headerButton" onClick={this.onClick} >
Copy link
Member

Choose a reason for hiding this comment

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

/me thought should be onClick={this.onClick}> similar to the <div below not padding out its closing >

@lukebarnard1 lukebarnard1 merged commit bb64e9a into develop Sep 28, 2017
@t3chguy t3chguy deleted the luke/fix-header-button-key-prop-warning branch May 12, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants