From: Eduardo San Martin Morote Date: Wed, 9 Feb 2022 23:24:21 +0000 (+0100) Subject: docs: notes about vuex X-Git-Tag: @pinia/testing@0.0.10~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3dad59c3064b3055d84cf9993992633bc7e76a5b;p=thirdparty%2Fvuejs%2Fpinia.git docs: notes about vuex --- diff --git a/README.md b/README.md index de71c9bd..d1cdb8a9 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,9 @@ Pinia is the most similar English pronunciation of the word _pineapple_ in Spani A few notes about the project and possible questions: -**Q**: _Does this replace Vuex, is it its successor?_ +**Q**: _Is Pinia the successor of Vuex?_ -**A**: No, or at least that's not the main intention +**A**: [Yes](https://vuejs.org/guide/scaling-up/state-management.html#pinia) **Q**: _What about dynamic modules?_ diff --git a/packages/docs/introduction.md b/packages/docs/introduction.md index d9845fd8..5b38493b 100644 --- a/packages/docs/introduction.md +++ b/packages/docs/introduction.md @@ -160,7 +160,9 @@ export const todos = defineStore('todos', { ## Comparison with Vuex -Pinia tries to stay as close to Vuex's philosophy as possible. It was designed to test out a proposal for the next iteration of Vuex and it was a success as we currently have an open RFC for Vuex 5 with [an API very similar](https://github.com/vuejs/rfcs/discussions/270) to the one used by Pinia. Note that I (Eduardo), the author of Pinia, am part of the Vue.js Core Team and actively participate in the design of APIs like the Router and Vuex. My personal intention with this project is to redesign the experience of using a global Store while keeping the approachable philosophy of Vue. I keep the API of Pinia as close as Vuex as it keeps moving forward to make it easy for people to migrate to Vuex or to even fusion both projects (under Vuex) in the future. +Pinia started out as an exploration of what the next iteration of Vuex could look like, incorporating many ideas from core team discussions for Vuex 5. Eventually, we realized that Pinia already implements most of what we wanted in Vuex 5, and decided to make it the new recommendation instead. + +Compared to Vuex, Pinia provides a simpler API with less ceremony, offers Composition-API-style APIs, and most importantly, has solid type inference support when used with TypeScript. ### RFCs