Open
Description
Which project does this relate to?
Router
Describe the bug
My current route - '/'
Im trying to get page params like this:
const route = getRouteApi('/_auth/users/$userId')
export function UsersList() {
const { userId } = route.useParams({ shouldThrow: false })
...
}
but im getting error - Error: Invariant failed: Could not find an active match from "/_auth/users/$userId"
Also types for shouldThrow
prop are wrong, it accepts only true
but shoud accept any boolean
value
Expecting behavior, that im just get undefined in my userId
value
Your Example Website or App
Steps to Reproduce the Bug or Issue
- go to '/' url in your project
- Call
useParams
with{ shouldThrow: false }
prop for another route for example'/users/$userId'
- get the error
Expected behavior
expected not getting arror just get undefined value
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
- Version: latest
Additional context
No response