Skip to content

Conversation

Copy link

Copilot AI commented Oct 21, 2025

This PR addresses issue #135 by creating comprehensive documentation for the vike-vue-pinia and vike-vue-query packages in their respective README.md files, following the documentation style established by vike-react-query.

Changes

vike-vue-query

Enhanced the README.md from 117 to 261 lines with the following improvements:

  • Features list: Added clear bullet points highlighting key benefits (component-level data fetching, automatic SSR, type-safety, caching, stale-while-revalidate)
  • Basic usage section: Created a focused, simplified example showing how to use useQuery with onServerPrefetch for SSR
  • SSR & Hydration section: Added detailed explanation of the data flow between server and client, including how data serialization prevents "flash of loading state"
  • Error Handling section: Provided comprehensive examples with retry logic, exponential backoff, and global error configuration
  • Client-only fetching section: Documented how to skip SSR for specific queries and explained common use cases
  • Enhanced Settings section: Expanded configuration documentation with explanations of common options and links to TanStack Query docs

vike-vue-pinia

Enhanced the README.md from 107 to 205 lines with the following improvements:

  • Features list: Added bullet points highlighting zero-config SSR, type-safety, and hydration safety
  • Basic usage section: Reorganized to show store definition first, then component usage, with clear explanation of automatic SSR benefits
  • SSR & Hydration section: Created new section explaining state transfer between server and client, hydration mismatch prevention, and pageContext.pinia access
  • Enhanced "Populate store with +data" section: Expanded with complete examples including +data.ts file, full store definition with initialization method, and clearer explanations of SSR behavior

Documentation Style

Both READMEs now follow a consistent structure similar to vike-react-query:

  • Clear table of contents with all sections
  • Features list prominently displayed at the top
  • Progressive complexity (basic concepts → advanced usage)
  • Comprehensive, working code examples
  • Helpful notes and tips using GitHub's alert syntax
  • Links to related Vike documentation

Refinements Based on Review

  • Removed incorrect "progressive rendering" claim from vike-vue-query (Vue doesn't support progressive rendering like React)
  • Deduplicated features by consolidating the separate "Benefits" section into the main Features list
  • Merged "Automatic SSR" and "Zero-config" features into a single "Zero-config SSR" point in vike-vue-pinia

These enhancements provide users with comprehensive guidance for integrating Pinia and TanStack Query into their Vike-Vue applications, with accurate explanations of SSR behavior, hydration, and best practices.

Fixes #135

Original prompt

This section details on the original issue you should resolve

<issue_title>Write docs for vike-vue-pinia and vike-vue-query</issue_title>
<issue_description>New docs for vike-vue live at vike.dev, for example:

But for vike-vue-pinia and vike-vue-query I think it's better we write the docs in the README.md file.

So far vike-vue-pinia and vike-vue-query don't have any documentation, contribution welcome to create some.</issue_description>

Comments on the Issue (you are @copilot in this section)

@brillout For example https://github.com/vikejs/vike-react/tree/main/packages/vike-react-query#readme.

Fixes #135


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: 4350pChris <20907452+4350pChris@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for vike-vue-pinia and vike-vue-query docs: Enhance documentation for vike-vue-pinia and vike-vue-query Oct 21, 2025
Copilot finished work on behalf of 4350pChris October 21, 2025 01:18
Copilot AI requested a review from 4350pChris October 21, 2025 01:18
@brillout
Copy link
Member

@4350pChris 👍 Let me know when this is ready for review.

@4350pChris 4350pChris marked this pull request as ready for review October 21, 2025 13:47
@brillout
Copy link
Member

Progressive rendering: The rest of your page renders while data is being fetched

Is that true? I don't think Vue supports that?

@brillout
Copy link
Member

image

This should be moved up and deduped.

@brillout
Copy link
Member

Otherwise this is quite a neat addition indeed.

@brillout
Copy link
Member

image

How about we merge both points into one point zero-config SSR

@4350pChris
Copy link
Member

image This should be moved up and deduped.

Ah true. It must've taken that from React... Good catch.

@4350pChris
Copy link
Member

@copilot Please implement the improvements from these past comments.

…features

Co-authored-by: 4350pChris <20907452+4350pChris@users.noreply.github.com>
Copy link
Author

Copilot AI commented Oct 21, 2025

image

This should be moved up and deduped.

Fixed in commit 2b47d82. I've removed the duplicate Benefits section and consolidated everything into the Features list at the top.

image

How about we merge both points into one point zero-config SSR

Done in commit 2b47d82. Merged both points into "Zero-config SSR: Store state is automatically serialized on the server and hydrated on the client — no manual setup needed".

Progressive rendering: The rest of your page renders while data is being fetched

Is that true? I don't think Vue supports that?

You're absolutely right. I've removed the progressive rendering claim from the documentation in commit 2b47d82. Vue doesn't support progressive rendering like React does with Suspense streaming.

Copilot AI requested a review from 4350pChris October 21, 2025 19:04
Copilot finished work on behalf of 4350pChris October 21, 2025 19:04
@brillout
Copy link
Member

brillout commented Nov 4, 2025

@4350pChris Can you double and triple check whether what copilot generated is accurate? I'll then review on my side and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write docs for vike-vue-pinia and vike-vue-query

3 participants