Start migrating from Vuex to Pinia
Vuex 4 had the number 4 due to its various breaking changes when upgrading to Vue 3, but overall it does not make much of a change. From the experience with Vuex 3 and 4, the Vue team had started a Vuex 5 RFC, but it evolved into Pinia, which is the new recommended state management library for Vue and is maintained by the same team as Vuex. Pinia appears to be simpler, and provides full TypeScript support, unlike Vuex, as mentioned in #1099 (closed).
Vuex 4 has seen its latest change in the actual code just over a year ago, and is said to be in maintenance mode; no new features will be added, bugs will still be fixed. We know how maintenance goes in the npm ecosystem, so this just means Vuex is deprecated and we should try to migrate away from it.
It seems possible to install Pinia alongside Vuex and use both independently, or have the Vuex store modules interact with Pinia stores and vice versa, so it should be possible to slowly migrate without having to rewrite the entire store in one go.
We can start the migration by just setting up Pinia, then migrate the simplest store modules first to get a feel of it.
image
, model
, ponos
and search
are stores where a migration would have a rather small impact, and their code is relatively simple, so the migration should be straightforward.
display
and notifications
are even simpler, but they might not be the best option as they do not include API requests (so we learn less from migrating them) and they are very widely used (which likely implies a lot of changes in a lot of components). They could just come afterwards.
Once the migration is complete, I guess we can open this.