Docs: fix invalid mapState example and magicValue usage#3102
Conversation
Fix magicValue computation to use store.count instead of this.count.
✅ Deploy Preview for pinia-official ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughMinor documentation corrections in the Chinese core concepts guide. A trailing comma was added to mapState syntax for consistency, and a code example was corrected to reference the store parameter instead of this context within a computed function. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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 |
This PR fixes two issues in the
mapStateexample instate.md:...mapState(...)to avoid a syntax error when copying the example.magicValueto usestore.countinstead ofthis.count, which is not reliably defined on the component instance and causes runtime warnings.before fixed
after fixed
Summary by CodeRabbit
Release Notes