It would be nice to have a function like useLocation that would be able to identify the current page. Right now I have to use window.location.pathname and do some processing on it. Or is there something I'm missing?
One benefit of providing this functionality directly from generouted is built in type safety when using Typescript.
It would be nice to have a function like
useLocationthat would be able to identify the current page. Right now I have to usewindow.location.pathnameand do some processing on it. Or is there something I'm missing?One benefit of providing this functionality directly from generouted is built in type safety when using Typescript.