4.4.0-alpha.1
https://codesandbox.io/s/qx464vwxlj
Click the links, check console output.
Layout component has explicit return false statement, so TestComponent shouldn't re-render when route changes.
Same example with Reach Router works well. https://codesandbox.io/s/6zv4m0wxp3
Although layout component works as expected, child component re-renders in route change. SCU doesn't prevent child re-render. (check console output after clicking links)
This is already changed on master.
Hi @timdorr. Just wondering, what causes this behaviour?
setState in the Router at the top level. Causes a render on navigation. That's gone now.
Got it. Thank you so much.
@timdorr @mjackson
Test sandbox updated with latest beta version. Still same behaviour. Nothing changed.
Thanks for bringing this to my attention, @kafein. I'm looking into it. I think you may be right that using the old context API is causing that re-render. I'm going to keep looking into this.
Hi @kafein, I just confirmed that beta.3 doesn't have this issue. You can see the codesandbox here: https://codesandbox.io/s/3265w17kjq
Thanks again for bringing it to our attention :)