What is the 'useHistory' hook used for in React Router?
The 'useHistory' hook is used to navigate programmatically between routes. It provides access to the history object, which allows you to push new entries onto the history stack or go back to previous entries.