Set the title of the page and update it when the value changes.
This is custom React hooks, you need to follow the Basic Rules when you use it.
The title of the tab follows the input.
const useDocumentTitle = (title: string) => void