I am trying to understand the difference between BrowserRouter and Router of the react-router-dom (v5) package and what difference it
BrowserRouter
Router
react-router-dom
BrowserRouter ignores the history prop as it handles the history automatically for you. If you need access to the history outside of a react component, then using Router should be fine.