this behavior is not expected.
First of all, I saw in your video that you are using react-router-dom
, as they say on the npmjs page you should move import from react-router instead.
Then you should open an issue directly on their Github. I hope they will find an answer quickly to your problem :)