<Route> components pass props.match as a fresh object when the URL / params have not changed. Is this by design? This was not the case with RR V3. This breaks the PureComponent paradigm. See codepen below for example.
Version
4.0.0
Test Case
https://codepen.io/anon/pen/NjYwZO?editors=1112
Steps to reproduce
Render a PureComponent within a Route.
Expected Behavior
If the URL has not changed then re-renders of the Route should be passed the same props.
Actual Behavior
match is always a new object causing the component to be re-rendered. Even though its contents are unchanged.
<Route>components passprops.matchas a fresh object when the URL / params have not changed. Is this by design? This was not the case with RR V3. This breaks the PureComponent paradigm. See codepen below for example.Version
4.0.0
Test Case
https://codepen.io/anon/pen/NjYwZO?editors=1112
Steps to reproduce
Render a PureComponent within a
Route.Expected Behavior
If the URL has not changed then re-renders of the
Routeshould be passed the same props.Actual Behavior
matchis always a new object causing the component to be re-rendered. Even though its contents are unchanged.