#Link Component is requiring search prop

12 messages · Page 1 of 1 (latest)

velvet hollow
#

I've been trying to use the link component, but they all have type errors because they say that the search prop is required. Would love more info here.

cobalt sphinx
#

on mobile can't share code snippet

velvet hollow
#

ok, this wasn't a custom link component though, imported strait from tanstack

cobalt sphinx
velvet hollow
#

welp

#

just figured out adding as const fixed it for me

cobalt sphinx
#

same error if you set type to string

velvet hollow
cobalt sphinx
# velvet hollow

you can remove as const and set type to ```
{
href: RegisteredRoutesInfo["routePaths"];
name: ReactNode | string;
}[]

velvet hollow
#

I knew this was typesafe, but dang

cobalt sphinx