TanStackT
TanStack2y ago
2 replies
verbal-lime

Why can't use errorComponent in createLazyFileRoute?

I try to use errorComponent in
createLazyFileRoute
but the component didn't show up when error happen from
loader
. But when i put errorComponent in
createFileRoute
it's working like what i expected (the component show up).
I want to know why it's like that because in https://tanstack.com/router/v1/docs/framework/react/guide/code-splitting
errorComponent
is supported by the
createLazyFileRoute


this is minimal producible example: https://stackblitz.com/edit/tanstack-router-gtkrcc?file=src%2Froutes%2Findex.lazy.tsx

thank you
Was this page helpful?