Comments (3)
it's already prefixed with _
and it's unlikely to be defined by the user given its short, prefixed, and non-descriptive name, so I prefer keeping it like that. Pretty much like we have in other parts of the Vue ecosystem
from pinia.
This is an interesting one. It makes me realize maybe all properties of the store should be prefixed with $
(maybe with the exception of patch
) since they are directly accessible on the store instance. Defining an id
on state
will override the store's id property and break things like devtools. Same with properties named patch, subscribe, state or reset
from pinia.
Very fast response, thanks. I agree that prefixing sounds like a good idea. Maybe also prefixing _r private property to maintain consistency?
from pinia.
Related Issues (20)
- Unable to test setup store actions with watcher HOT 1
- Component not updating (even though data is updated in devtools) when using external class to change data in Pinia Store [Nuxt 2/Bridge]
- `_UnwrapAll` not working when pinia stores is from npm package HOT 1
- $subscribe doesn't trigger if only computed is returned from the store HOT 1
- 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
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.