Skip to content

matches property of components overrides global Element.matches #226

Description

@anqur
  • I was using swiper.js and its core library uses Element.matches for some selecting mechanism, and <Match />'s matches property overrides this, raising type error matches is not a function that it took me about 1 hr to realize that it was naming pollution
  • My solution is wrapping all my components into another big one (before this I used a <main/> plain HTML element with path property), and giving the top-level component a path property for the router and it worked well
  • Maybe this issue could be taken into further account, because the stacktrace of naming pollution in some debuggers like DevTools is not that informative

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions