react-use
react-use copied to clipboard
Add useTitle option to restore original on unmount
Is your feature request related to a problem? Please describe.
When implementing useTitle you'd usually want to show a default when a page has not implemented the hook yet.
Describe the solution you'd like
An option restoreOriginalOnUnmount which will revert to the first title value.
Describe alternatives you've considered
restoreOnUnmount does a similar thing, but it reverts to the previous title, not the original one. This is actually not so useful for pages: if you go from About to Profile to Home and the latter doesn't set a title, it will restore to About.