Dynamic href is not Supported in the App Router
Unanswered
Common carp posted this in #help-forum
Common carpOP
I am trying to create dynamic links in my TanStack Table. Here is part of the ColumnDef below -
Here I get "Handling "Dynamic href is not Supported in the App Router" Error in Next.js". The nextJs docs suggestion is to use the actual value but I don't think thats possible in my case. Do you guys have any suggestions ?
export const columns: ColumnDef<Actor>[] = [
{
accessorKey: "actorName",
header: "Actor Name",
cell: (value) => (
<Link href={`/actors/${value.toString()}`}>
<div className="w-[300px]">
{translateIdToName(value.getValue()) as React.ReactNode}
</div>
</Link>
),
},Here I get "Handling "Dynamic href is not Supported in the App Router" Error in Next.js". The nextJs docs suggestion is to use the actual value but I don't think thats possible in my case. Do you guys have any suggestions ?