router icon indicating copy to clipboard operation
router copied to clipboard

LoaderContext type is not exported from @tanstack/react-router

Open aadamw opened this issue 2 years ago • 0 comments

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

  1. Open the reproduction link
  2. Go to /src/posts.route.tsx file
  3. Hover over LoaderContext import
  4. 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

aadamw avatar Jan 05 '24 19:01 aadamw