I had a similar problem, in my case I exported useParams from react-router instead of react-router-dom. I got no errors, just empty object for params. Took me some time to figure out where the problem was.
useParams
react-router
react-router-dom