Skip to content

Prevent polluting the DOM with unknown attributes#302

Draft
kettanaito wants to merge 2 commits intomasterfrom
301-unknown-attributes
Draft

Prevent polluting the DOM with unknown attributes#302
kettanaito wants to merge 2 commits intomasterfrom
301-unknown-attributes

Conversation

@kettanaito
Copy link
Owner

Changes

  • Manually filters out semantically invalid attributes from Box, Composition, and other styled components exported by the library. The same approach is used in Emotion, which prunes invalid props by default.

There is no built-in API in styled-components, only an active (?) discussion regarding the matter.

Issues

Release version

  • internal (no release required)
  • patch (bug fixes)
  • minor (backward-compatible changes)
  • major (backward-incompatible, breaking changes)

Contributor's checklist

  • My branch is up-to-date with the latest master
  • I ran yarn verify to see the build and tests pass

@kettanaito kettanaito force-pushed the 301-unknown-attributes branch from 7d2b300 to de2780c Compare February 12, 2020 08:19
@kettanaito kettanaito force-pushed the 301-unknown-attributes branch from de2780c to 75ff3f6 Compare May 27, 2020 07:48
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.

Warning: React does not recognize the A prop on a DOM element

1 participant