Skip to content
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.

Issue with React Router v4 props.match #33

Open
oskarer opened this issue Mar 27, 2017 · 3 comments
Open

Issue with React Router v4 props.match #33

oskarer opened this issue Mar 27, 2017 · 3 comments

Comments

@oskarer
Copy link

oskarer commented Mar 27, 2017

Using React Router v4, it adds the match object (https://reacttraining.com/react-router/web/api/match) to all React components. This causes why-did-you-update to do a deep diff on this object and warn even if there are no unnecessary renders.

Any ideas how to resolve this?

@kamleshchandnani
Copy link

I am also facing the same issue.

@baerrach
Copy link

If you can't figure out a way to patch the external component then just exclude it?

  whyDidYouUpdate(React, {
    exclude: [
      // React Router
      /^Route/,
    ]
  });

@dcflow
Copy link

dcflow commented Mar 31, 2018

It gives a warning also for Link and maybe for other react-router related components.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants