I am getting above mentioned error in heading on this code snippet
<Link
href={{
pathname: `/${String(service.name.toLowerCase())}`,
}}
>
Even though service.name is already a string but i also added String type but still expo not considering this as same type ExternalPathString to this.
I am getting above mentioned error in heading on this code snippet
<Link
href={{
pathname: `/${String(service.name.toLowerCase())}`,
}}
>
Even though service.name is already a string but i also added String type but still expo not considering this as same type ExternalPathString to this.
According to the docs for dynamic routes, it shows you should add [name] and then reference what [name] should be in a separate property called params.
Something like below should work, if it does not please let me know and I'll try and help you from there.
<Link
href={{
pathname: '/[serivceName]',
params: { serviceName: servie.name.toLowerCase() },
}}>
{/* Content here */}
</Link>
I think you do need a file called the name of your service or [serviceName].(jsx/tsx) for this to work, but I think you may have already done that.