Skip to content
Source
Sign inSign up
TanStack/query

Route.path is not matching it's type defintion #8619

Send to my agent
Closedmindaugasb-isense(GitHub profile, opens in a new tab) opened this issue 1 comment

Describe the bug

// "@tanstack/react-router": "^1.99.0",

import Route from 'specific-route'

import Route as OtherRoute from 'specific-route'

beforeLoad: () => { router.navigate({ to: OtherRoute .path }) // the acutal path some times is missing the leading slash and it's not matching it's type definition },

const Component = () => { const navigate = useNavigate() navigate({ to: OtherRoute.path }) // the acutal path some times is missing the leading slash and it's not matching it's type definition }

Your minimal, reproducible example

Steps to reproduce

import Route as OtherRoute from 'specific-route'

beforeLoad: () => { router.navigate({ to: OtherRoute .path }) // the acutal path some times is missing the leading slash and it's not matching it's type definition },

const Component = () => { const navigate = useNavigate() navigate({ to: OtherRoute.path }) // the acutal path some times is missing the leading slash and it's not matching it's type definition }

Expected behavior

The Rout.path should match it's type defintion. Some times it's missing the leading slash.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

Windows, Chrome (updated)

Tanstack Query adapter

None

TanStack Query version

"@tanstack/react-router": "^1.99.0",

TypeScript version

No response

Additional context

No response

  1. this seems like the wrong repo to open this issue? You likely want:

    But please be advised that issues require a minimal reproduction, best forked from one of our examples.

  2. TkDodo closed this

  3. TkDodo added labelsinvalid

Sign in to join this conversation.