Skip to content

Docs: Fix tanstack-react snippets#34814

Merged
kylegach merged 1 commit into
nextfrom
docs-tanstack-react-fix-snippets
May 18, 2026
Merged

Docs: Fix tanstack-react snippets#34814
kylegach merged 1 commit into
nextfrom
docs-tanstack-react-fix-snippets

Conversation

@kylegach
Copy link
Copy Markdown
Contributor

@kylegach kylegach commented May 15, 2026

What I did

See title

Checklist for Contributors

Testing

Manual testing

N/A - docs-only change

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated Storybook TanStack React framework configuration snippets to use the latest integration
    • Clarified CSF Next examples with proper helper functions and imports
    • Removed placeholder comments from documentation
    • Improved preview and configuration example clarity and structure

Review Change Stack

@kylegach kylegach self-assigned this May 15, 2026
@kylegach kylegach requested a review from jonniebigodes as a code owner May 15, 2026 22:15
@kylegach kylegach added documentation patch:yes Bugfix & documentation PR that need to be picked to main branch ci:docs Run the CI jobs for documentation checks only. labels May 15, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ddcf1fee-39fd-465e-bc2c-e4d854bdf07b

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9e284 and 15768e1.

📒 Files selected for processing (10)
  • docs/_snippets/tanstack-react-add-framework.md
  • docs/_snippets/tanstack-react-framework-options.md
  • docs/_snippets/tanstack-react-mock-module-preview.md
  • docs/_snippets/tanstack-react-mock-server-fn-stories.md
  • docs/_snippets/tanstack-react-plain-component-story.md
  • docs/_snippets/tanstack-react-preview-migrate.md
  • docs/_snippets/tanstack-react-query-in-story.md
  • docs/_snippets/tanstack-react-query-setup.md
  • docs/_snippets/tanstack-react-route-story.md
  • docs/_snippets/tanstack-react-route-tree-overrides.md
💤 Files with no reviewable changes (9)
  • docs/_snippets/tanstack-react-plain-component-story.md
  • docs/_snippets/tanstack-react-mock-server-fn-stories.md
  • docs/_snippets/tanstack-react-query-in-story.md
  • docs/_snippets/tanstack-react-mock-module-preview.md
  • docs/_snippets/tanstack-react-add-framework.md
  • docs/_snippets/tanstack-react-preview-migrate.md
  • docs/_snippets/tanstack-react-route-tree-overrides.md
  • docs/_snippets/tanstack-react-route-story.md
  • docs/_snippets/tanstack-react-framework-options.md

📝 Walkthrough

Walkthrough

Documentation snippets for the Storybook TanStack React integration are updated to clarify framework initialization patterns, add CSF Next examples, improve type safety in configuration code, and remove outdated placeholder comments.

Changes

TanStack React Documentation Snippets

Layer / File(s) Summary
Framework setup documentation
docs/_snippets/tanstack-react-framework-options.md, docs/_snippets/tanstack-react-preview-migrate.md
CSF Next examples with defineMain and definePreview are added to framework options and preview migration snippets; imports updated from @storybook/react-vite to @storybook/tanstack-react.
Query configuration and setup
docs/_snippets/tanstack-react-query-setup.md
CSF 3 snippet refactored to import and use the Preview type, define a typed preview constant with beforeEach cache clearing, and export that constant; comments updated to reference story beforeEach instead of route loaders; placeholder comment removed.
Feature usage examples
docs/_snippets/tanstack-react-mock-module-preview.md, docs/_snippets/tanstack-react-mock-server-fn-stories.md, docs/_snippets/tanstack-react-plain-component-story.md, docs/_snippets/tanstack-react-query-in-story.md, docs/_snippets/tanstack-react-route-story.md, docs/_snippets/tanstack-react-route-tree-overrides.md
CSF Next examples with definePreview added to mock module preview; outdated HTML comments about needing JS snippets for both CSF 3 and CSF Next removed from all feature example snippets.

Possibly Related PRs

  • storybookjs/storybook#34764: Complements this PR's query setup refactor in tanstack-react-query-setup.md by updating the beforeEach-driven queryClient cache handling patterns.
  • storybookjs/storybook#34639: Originally introduced the TanStack React documentation snippets referenced in this PR's updates to framework configuration and feature examples.

🎯 2 (Simple) | ⏱️ ~8 minutes

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@kylegach kylegach requested a review from huang-julien May 18, 2026 16:57
@kylegach kylegach merged commit 986b553 into next May 18, 2026
16 of 20 checks passed
@kylegach kylegach deleted the docs-tanstack-react-fix-snippets branch May 18, 2026 21:12
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants