Skip to content

Conversation

@Jiamingou
Copy link
Contributor

@Jiamingou Jiamingou commented Oct 2, 2025

According to "https://pinia.vuejs.org/core-concepts/#Setup-Stores", it claimed that "you must return all state properties in setup stores for Pinia to pick them up as state." Anyway, this code broke that rule , I believe is a typo, hence I "put" the list ref back into the user store.

Summary by CodeRabbit

  • Documentation
    • Updated the composing stores guide to show the cart example returning a list alongside summary and purchase.
    • Examples now reference a single source of truth for list data, improving clarity and consistency.
    • Clarified how list length and data are derived to better match real usage.

According to "https://pinia.vuejs.org/core-concepts/#Setup-Stores", it claimed that  "you must return all state properties in setup stores for Pinia to pick them up as state." Anyway, this code broke that rule , I believe is a typo, hence I "put" the `list` ref back into the user store.
@netlify
Copy link

netlify bot commented Oct 2, 2025

Deploy Preview for pinia-official ready!

Name Link
🔨 Latest commit cea0e8d
🔍 Latest deploy log https://app.netlify.com/projects/pinia-official/deploys/68dfcc44663b3800080c2fb5
😎 Deploy Preview https://deploy-preview-3052--pinia-official.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

Walkthrough

Documentation change: the cart store example's public return object in packages/docs/cookbook/composing-stores.md is updated to include a new list property, changing the shown API from { summary, purchase } to { list, summary, purchase }. No logic or control-flow changes.

Changes

Cohort / File(s) Summary
Docs
packages/docs/cookbook/composing-stores.md
Updated documented useCartStore return shape to include list alongside summary and purchase (from { summary, purchase }{ list, summary, purchase }). No other logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • posva

Poem

I nudged a carrot, added a list,
A tiny hop, a tidy twist.
Now three things hop within the crate,
list, summary, purchase — neat and straight.
Crunching carrots, docs delight. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “Update composing-stores.md” indicates that a documentation file is being changed but does not describe the specific correction of returning the missing list property in the store example, making it too generic to convey the main change. Please revise the title to clearly summarize the main content change, for example “Return missing list ref in composing-stores example” so that it describes the key correction made.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 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 4749d06 and cea0e8d.

📒 Files selected for processing (1)
  • packages/docs/cookbook/composing-stores.md (1 hunks)

@Jiamingou Jiamingou requested a review from posva October 3, 2025 13:24
@posva posva merged commit 04ea635 into vuejs:v3 Oct 3, 2025
5 checks passed
@Jiamingou Jiamingou deleted the patch-1 branch October 3, 2025 14:39
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.

2 participants