Docs Roadmap
See original GitHub issueThese are the documentation sections I want to add or improve
- Migrate to Vue.js theme
- Use a neutral font (#873)
- Adapt instructions for Vue 2.7
- Cookbook
- Testing
- Initializing the store before
- What is needed for Nuxt (maybe link to another page) (#910)
- Advanced reactivity
- Show how to use composables inside option and setup stores
- Spltting the store into multiple files (#802)
- Allowing making a Store implement an interface (state, actions, or/and getters)
- Advanced SSR
- Hydrating differing state like
useLocalStorage()
- Differences between Setup and Option stores
- Using stores before hydration https://github.com/vuejs/pinia/discussions/948
- Hydrating differing state like
- Handling Errors with API calls
- Testing
- State must be defined as a whole #1335
- Setup Stores (https://github.com/vuejs/pinia/issues/978)
- Currently only Option stores are documented properly. It would be nice to have a switch somewhere or to mention them early on and link to a cookbook entry about advanced reactivity as these stores allow patterns that are impossible (or not intuitive) to achieve with the options API, like
watching
- Currently only Option stores are documented properly. It would be nice to have a switch somewhere or to mention them early on and link to a cookbook entry about advanced reactivity as these stores allow patterns that are impossible (or not intuitive) to achieve with the options API, like
- Being able to switch between syntaxes (option / setup store) (TBD if worth) https://github.com/vuejs/pinia/issues/1265
- Reorganize the What is Pinia and Getting Started sections so the latter shows complete examples (#1195)
If you have suggestions about common use cases that are not covered or improvement / refactoring for the existing docs, please share
How to contribute
If you want to contribute to the docs, make sure first there is no active Pull Request or an existing branch on this repository. Fork this repo, and create a Pull Request. You can mark it as WIP/Not ready for review if you need more time to work on it. This would avoid having two people working on the same thing.
If you are uncertain about anything you wrote, just leave a review on your own Pull Request so I can help.
Translations
If you want to contribute translations, only the Chinese and English versions are hosted within the repository. Other translations should be hosted elsewhere following the translation guidelines
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:27 (10 by maintainers)
Top GitHub Comments
@Jamiewarb I added an item to the list and updated the issue about how to contribute. Let me know if it’s missing anything! I’m really keen on having cookbook entries contributed 🙂
I don’t think this is correct. If you had a “global”
reactive
object and imported it into multiple components, it would only trigger a render if part of that object is tracked and that specifically is changed. For example if in one component you accessglobalObj.prop1
within the template or in a computed etc. the render will only trigger if you changed theprop1
property on that object, whether it be within the component or elsewhere. That’s the beauty of reactivity.This concept is the same for stores, when created there’s a global instance of them. Even if you imported the same store in every component (with mapStores or otherwise) it’ll only trigger a change if a property has been tracked within that component, and that specific property changed. For example, you access
myStore.prop2
within the template, it will only render again ifprop2
is changed. If you don’t access anything on the store, nothing is tracked, so any changes to the store won’t cause a render.I’m using the words
track
andtrigger
on purpose as that’s in line with how the docs explain it, see https://v3.vuejs.org/guide/reactivity.html#how-rendering-reacts-to-changes & subsequent pages.