Skip to content

Commit

Permalink
Merge pull request #40 from modelair/patch-1
Browse files Browse the repository at this point in the history
Update stores.md
  • Loading branch information
altrusl authored Oct 9, 2024
2 parents d603d80 + 1f2b5a8 commit cdc77cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/development/stores.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ As for performance, [according to tests](https://github.com/vuesence/pinia-vs-re

You should also keep in mind that any dependency (in this case the Pinia library) can bring problems similar to the "RIP Vuex" situation when the library dies, becomes obsolete, is no longer supported, or vulnerabilities are found in it. Composable features, on the other hand, look like a thorough innovation to the Vue framework.

Here is an [interesting discussion](https://www.reddit.com/r/vuejs/comments/18fnilj/why_to_use_pinia_instead_of_global_refs/) about it on */r/vuejs*. [Code example](https://github.com/jellyfin/jellyfin-vue/blob/master/frontend/src/store/clientSettings.ts#L98) from Reddit user **@ferferga** shows how to use TypeScript classes with private modifiers, getters, setters (no *.value*) and first class type support as composable stores (which would be impossible with Pinia). Using TS classes here might not be a good practice but demonstrates flexibility and power of the Composition API.
Here is an [interesting discussion](https://www.reddit.com/r/vuejs/comments/18fnilj/why_to_use_pinia_instead_of_global_refs/) about it on */r/vuejs*. [Code example](https://github.com/jellyfin/jellyfin-vue/tree/master/frontend/src/store) from Reddit user **@ferferga** shows how to use TypeScript classes with private modifiers, getters, setters (no *.value*) and first class type support as composable stores (which would be impossible with Pinia). Using TS classes here might not be a good practice but demonstrates flexibility and power of the Composition API.

Also here is a lifehack for Devtools from user **@coolcosmos**: *I just use refs. The cons is you lose the Devtools but in dev mode I import all my refs and pass them to pinia so I have all the pros and no cons.*

Expand Down

0 comments on commit cdc77cf

Please sign in to comment.