I have copied the react router "2nd Example: Nested Routing" example from the react-router docs in to my app as-is. (The "1st Example: Basic Routing" works fine)
The error I'm getting is Attempted import error: 'useRouterMatch' is not exported from 'react-router-dom'
The example references useRouterMatch but it doesn't seem to be exported and searching google for 'useRouterMatch' returns no results outside of the example so I'm having a hard time finding docs or anything.
Here are all my react-router dependencies from package.json:
"@types/react-router": "^5.1.1",
"@types/react-router-bootstrap": "^0.24.5",
"@types/react-router-dom": "^4.3.5",
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^5.1.2",