Skip to content

don't pass unneeded custom props to native elements#557

Merged
interim17 merged 2 commits intomainfrom
maintenance/dom-warnings
Sep 13, 2024
Merged

don't pass unneeded custom props to native elements#557
interim17 merged 2 commits intomainfrom
maintenance/dom-warnings

Conversation

@interim17
Copy link
Copy Markdown
Contributor

@interim17 interim17 commented Sep 11, 2024

Time estimate or Size

tiny

Problem

We are passing custom props to the native checkbox and getting this warning in the console when running main:

Warning: React does not recognize the `checkboxLevel` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `checkboxlevel` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Solution

Deleting props instead of destructuring to remove (first commit) because linter was mad about it.

@interim17 interim17 requested a review from a team as a code owner September 11, 2024 18:51
@interim17 interim17 requested review from ShrimpCryptid and meganrm and removed request for a team September 11, 2024 18:51
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 11, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 66.67% 664/996
🟡 Branches 66.21% 96/145
🔴 Functions 35.83% 91/254
🟡 Lines 64.91% 590/909

Test suite run success

121 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 863297f

Copy link
Copy Markdown
Contributor

@ShrimpCryptid ShrimpCryptid left a comment

Choose a reason for hiding this comment

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

LGTM!

@interim17 interim17 merged commit d29e92b into main Sep 13, 2024
@interim17 interim17 deleted the maintenance/dom-warnings branch September 13, 2024 17:10
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