Skip to content

Conversation

@Varunchandrashekar05
Copy link

@Varunchandrashekar05 Varunchandrashekar05 commented Oct 26, 2025

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.

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.
@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2025

⚠️ No Changeset found

Latest commit: 4b5170e

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

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

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
Loading

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 name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring 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 ⚠️ Warning The 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 name Status Explanation
Title Check ✅ Passed The 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 38b4008 and 0914164.

📒 Files selected for processing (1)
  • docs/framework/solid/guides/suspense.md (1 hunks)

Remove unnecessary createEffect and rely on direct query.data access.
According to TanStack Query Solid docs, accessing query.data directly
inside a Suspense boundary automatically triggers suspension.

Addresses CodeRabbit AI feedback for proper SolidJS patterns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant