notFound data always nested in data.data, and props.data type is unknown
Hello)
In defaultNotFoundComponent, props.data is typed as unknown. At runtime, props.data is an object: { data: T, isNotFound: true, routeId: string }.
The user-provided data T from return notFound({ data: T }) is unexpectedly nested under props.data.data
repo: https://stackblitz.com/edit/tanstack-router-zzqpfdfg?file=src%2Fmain.tsx
// need select post by id
4 Replies
passive-yellow•2mo ago
Hello,
Would you be able to create an issue in the repository for this?
I’ll look into the root cause and help resolve it 🙂
variable-limeOP•2mo ago
passive-yellow•2mo ago
Thanks!
I’ll try to handle it as quickly as possible and open a PR soon!
passive-yellow•2mo ago