Version
4.2.2
Test Case
https://codesandbox.io/s/rjl08qoxlp
Steps to reproduce
Use a context provider inside the router component
Expected Behavior
Using the new context provider should not break the router.
Actual Behavior
Using the new context provider is breaking the router.