Comments (1)
For now, there is no intention of shipping this feature with the existing ones because it makes things different when using the store, while it is not explicit why things are not unwrapped anymore (still same useStore()
call). In practice, I've played with both ideas, and I rarely extract refs from the store, I use the store directly, as a whole, as a service. You don't need to use storeToRefs().
It's also worth noting that this can be implemented in user land with a custom defineStore that calls storeToRefs()
.
That being said, I don't want to give up the idea yet completely, so I will move it to Discussions and see if the community comes up with other arguments
from pinia.
Related Issues (20)
- When I defineStore, if I use the same id as another Store, the data is not rendered to the page and no error is reported in the console. HOT 1
- Nuxt3 Store $patch returns error on production HOT 2
- error TS2536: Type 'key' cannot be used to index type 'Store<string, S, G, {}>
- Cant create an async store HOT 2
- Ability to manually trigger plugin action subscriptions within a setup store HOT 1
- acceptHMRUpdate skips optional attributes without default values HOT 3
- Pinia Eslint plugin HOT 9
- Typings for refs seem to be wrong in setup store HOT 3
- TS(7022): implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer HOT 1
- Using Pinia app crashes with Error: The requested module 'vue-demi' does not provide an export named 'hasInjectionContext'
- The inferred type of 'default' cannot be named without a reference to '.pnpm/[email protected][email protected][email protected]/node_modules/pinia'. This is likely not portable. A type annotation is necessary.ts(2742) HOT 1
- Computed does not work in nested store
- In Pinia, the `watch` function fails to capture changes to object properties within the `state`.
- Composition API documentation HOT 1
- mapActions does not work with parameters HOT 1
- Return type of storeToRefs doesn't match runtime result if values are nested computed values HOT 1
- Composing Store lose typescript type HOT 1
- pinia doesn't show state properly when useAsyncState has been used
- Nuxt3 useRoute update HOT 1
- current use vscode vue3.2+pinia project, Mouse click can not jump HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinia.