-
-
Couldn't load subscription status.
- Fork 3.5k
docs(solid-query): fix incorrect Vue.js code example in Suspense guide #9813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs(solid-query): fix incorrect Vue.js code example in Suspense guide #9813
Conversation
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.
|
WalkthroughReplaces 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
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
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit