Skip to content
Source
Sign inSign up
TanStack/query

docs(solid-query): fix incorrect Vue.js code example in Suspense guide #9813

MergedVarunchandrashekar05(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/9813/headmerged by TkDodo View on GitHub

Replace Vue.js code example with proper SolidJS syntax in the Suspense documentation. The example was using Vue's defineComponent and setup() instead of SolidJS patterns.

Fixes issue with non-existent useSuspenseQuery examples in Solid Query docs.

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Updated Suspense guide to replace the Vue-based example with a SolidJS functional-component example.
    • Code samples switched to TSX and demonstrate using the query hook pattern to access data inside a Suspense boundary.
    • Removed prior suspense control-flow example and clarified relying on Suspense boundaries for suspension behavior.
    1. ⚠️ No Changeset found

      Latest commit: 4b5170eafe722bae5c651e8955b3bd30725684ae

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    2. Walkthrough

      Replaces a Vue Suspense example with a SolidJS functional component that uses useQuery and JSX, removing Vue's setup/suspense pattern and relying on a Suspense boundary to suspend until query.data is available.

      Changes

      Cohort / File(s)Summary
      SolidJS Suspense Documentation
      docs/framework/solid/guides/suspense.md
      Replace Vue SFC example (defineComponent/setup/suspense) with a SolidJS TSX functional component using useQuery and JSX. Remove explicit suspense() awaiting; rely on Suspense boundary and render query.data directly. Update code block language to TSX and adjust imports.

      Sequence Diagram(s)

      sequenceDiagram
          participant Suspense as Suspense Boundary
          participant Component as SolidJS Component
          participant Query as useQuery Hook
      
          Component->>Query: call useQuery(queryKey, queryFn)
          Query-->>Component: return query object (status, data, promise)
          Component->>Suspense: attempt to read query.data during render
          Suspense->>Query: if not ready, wait on query promise
          Query-->>Suspense: resolve promise when data ready
          Suspense-->>Component: allow render to continue
          Component->>Component: render JSX with query.data

      Estimated code review effort

      🎯 2 (Simple) | ⏱️ ~10 minutes

      • Check useQuery import and API usage matches @tanstack/solid-query version.
      • Verify the TSX example compiles (props/JSX types) and that Suspense boundary behavior is correctly described.
      • Confirm code block language and inline comments reflect SolidJS patterns.

      Poem

      🐇 I hopped from Vue leaves to Solid ground,

      Suspense now waits where hooks are found, query.data blooms when promises cease, Docs now whisper a reactive peace, 🥕✨ — a rabbit's small release

      Pre-merge checks and finishing touches

      ❌ Failed checks (2 warnings)
      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
      Description Check⚠️ WarningThe pull request includes an introductory description that clearly explains the change (replacing Vue code with SolidJS in the Suspense documentation) and its motivation. However, the description does not properly follow the required template structure. The "## 🎯 Changes" section, which is a required component, is empty and only contains the placeholder comment rather than filled-in content describing the changes and motivation. Additionally, the checklist items in the "## ✅ Checklist" section are unchecked, suggesting the author has not confirmed following the contributing guide or completing local testing. The "## 🚀 Release Impact" section is correctly marked as docs/CI/dev-only, which is appropriate for documentation changes.The "## 🎯 Changes" section should be filled in with the actual change description (the information currently in the intro can be moved here). The checklist items should be checked if the author has followed the contributing guide and tested locally, or clarified if they have not. Once these sections are properly completed according to the template structure, the description will meet the requirements.
      ✅ Passed checks (1 passed)
      Check nameStatusExplanation
      Title Check✅ PassedThe pull request title "docs(solid-query): fix incorrect Vue.js code example in Suspense guide" is fully related to the changeset. According to the raw summary, the PR replaces a Vue-based Suspense example (using defineComponent and setup) with proper SolidJS functional component syntax in the documentation file. The title clearly and specifically describes this main change without vague terminology or unnecessary detail. The conventional "docs(scope): description" format makes it scannable and professional.
      ✨ Finishing touches
      • 📝 Generate docstrings
        🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment

      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.
    3. Actionable comments posted: 1

      📜 Review details

      Configuration used: CodeRabbit UI

      Review profile: CHILL

      Plan: Pro

      📥 Commits

      Reviewing files that changed from the base of the PR and between 38b40081cedd207285ac0b4bb6818a2e84704b95 and 09141645bb4f0e4b5bfc77ffc0ed7395f2b341a7.

      📒 Files selected for processing (1)
      • docs/framework/solid/guides/suspense.md (1 hunks)
      OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)
    4. TkDodo merged this878782b

    5. TkDodo closed this

Sign in to join this conversation.