useRouter hook
I'm trying to use the useRouter hook so that I can acquire the base path and pass it into my sidebar component without the end user having to write it themselves. Also, I'd like to acquire all defined routes so that I can match against whatever route was defined in my component, and tell the end user the route defined doesn't exist. But correct me if I'm wrong, is the useRouter hook private?
Upon analyzing the router/index.jsx distribution, I think it is private, right? So that's why I'm getting the previous error.
Could we discuss a PR to expose the useRouter hook, or perhaps a new hook exposing read-only access to this information?
The component im building for better context:
Upon analyzing the router/index.jsx distribution, I think it is private, right? So that's why I'm getting the previous error.
Could we discuss a PR to expose the useRouter hook, or perhaps a new hook exposing read-only access to this information?
The component im building for better context: