react-router
react-router copied to clipboard
Generic for useLocation to allow to provide type for Location State
The current implementation of useLocation does not allow for state type to be passed as a generic to Location return type. By just passing a simple generic we can safely type the state from the location.