Skip to content

Conversation

@kraenhansen
Copy link
Contributor

@kraenhansen kraenhansen commented Jan 19, 2026

Going through the tutorial, it seems the return type of this Route.useLoaderData is automatically inferred.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated tutorial documentation for fetching external data to showcase streamlined API usage. The example now demonstrates automatic type inference capabilities, eliminating the need for explicit type annotations when retrieving data from loaders.

✏️ Tip: You can customize this high-level summary in your review settings.

Going through the tutorial, it seems the return type of this Route.useLoaderData is automatically inferred.
@github-actions github-actions bot added the documentation Everything documentation related label Jan 19, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

A documentation update that removes an explicit generic type annotation from Route.useLoaderData() in a React tutorial example, allowing the type to be inferred from the loader's return type instead.

Changes

Cohort / File(s) Summary
Documentation Example Update
docs/start/framework/react/tutorial/fetching-external-api.md
Removed explicit type parameter `<{ movies: Movie[]; error: string

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • examples: fix paraglide start example #5344: Both PRs modify usages of Route.useLoaderData(); this one removes explicit type annotations in documentation while the related PR changes the loader return shape and corresponding destructuring.

Suggested labels

documentation

Poem

🐰 A type once written in stone so grand,
Now whispers softly, as inference planned.
Simpler docs, clearer sight,
Let the code infer right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the useLoaderData signature in the fetching-external-api tutorial documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@schiller-manuel schiller-manuel changed the title Update useLoaderData signature in fetching-external-api tutorial docs: Update useLoaderData signature in fetching-external-api tutorial Jan 19, 2026
@schiller-manuel schiller-manuel merged commit 46ff9fa into TanStack:main Jan 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants