Version
v5.2.0
Test Case
https://codesandbox.io/s/react-router-fki8l?file=/src/App.jsx
Steps to reproduce
In the sandbox above, click the button named Toggle Value and see console
Expected Behavior
A component should not re-render if it wrapped by memo
Actual Behavior
A component re-render because match prop is a new object even if URL have not changed.
Is this a normal behavior ? I just started optimizing my app and I found this to be a big problem for me