router
router copied to clipboard
LoaderContext type is not exported from @tanstack/react-router
Describe the bug
According to this section of documentation about code-splitting: https://tanstack.com/router/v1/docs/guide/code-splitting#data-loader-splitting
LoaderContext type should be exported from @tanstack/react-router, but in reality is not.
Your Example Website or App
https://stackblitz.com/edit/github-vwuepr?file=src%2Fposts.route.tsx
Steps to Reproduce the Bug or Issue
- Open the reproduction link
- Go to
/src/posts.route.tsxfile - Hover over LoaderContext import
- You should see following error:
'"@tanstack/react-router"' has no exported member named 'LoaderContext'. Did you mean 'LoaderFnContext'?ts(2724
Expected behavior
LoaderContext type is exported from @tanstack/react-router
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response