Today I learned

Hooks in React Router

React-Router introduced new hooks with its release of version 5: useHistory, useLocation, useParams and useRouteMatch.

In my opinion, these new hooks make working with react-router even more convient and maintainable, so if you have not updated to using them yet, give it a try!

Learn more: https://css-tricks.com/the-hooks-of-react-router/

Greetings Marco

Go back to other today-i-learned posts