All Projects → mesqueeb → vuex-easy-access

mesqueeb / vuex-easy-access

Licence: MIT license
Unified syntax for accessing your Vuex store through simple set() and get() functions + auto generate mutations

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to vuex-easy-access

okito
Your best flutter coding friend. All in one; state management, navigation management(with dynamic routing), local storage, localization, dependency injection, cool extensions with best usages and with the support of best utilities!
Stars: ✭ 37 (-28.85%)
Mutual labels:  store
semicon
A collection of icons for the Semantic Web and Linked Open Data world.
Stars: ✭ 20 (-61.54%)
Mutual labels:  store
AntSword-Store.github.io
AntSword 插件市场,新插件上架申请、后门插件举报
Stars: ✭ 28 (-46.15%)
Mutual labels:  store
deep-state-observer
State library for high performance applications.
Stars: ✭ 25 (-51.92%)
Mutual labels:  store
keshi
A better in-memory cache for Node and the browser
Stars: ✭ 76 (+46.15%)
Mutual labels:  store
vue
Vue integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
Stars: ✭ 25 (-51.92%)
Mutual labels:  store
shop-store-client
网上书店商城-前端
Stars: ✭ 41 (-21.15%)
Mutual labels:  store
dicom-dimse-native
node js native addon for dimse services
Stars: ✭ 33 (-36.54%)
Mutual labels:  store
solidus graphql api
GraphQL comes to Solidus!
Stars: ✭ 28 (-46.15%)
Mutual labels:  store
vue-unstated
A tiny state management library for Vue Composition API.
Stars: ✭ 30 (-42.31%)
Mutual labels:  store
FSCheckoutSheet
A WKWebView wrapper that handles interaction w/ a FastSpring checkout form
Stars: ✭ 18 (-65.38%)
Mutual labels:  store
Shopixl
Open-source, self-hosted, Buycraft alternative
Stars: ✭ 17 (-67.31%)
Mutual labels:  store
rdflib-hdt
A Store back-end for rdflib to allow for reading and querying HDT documents
Stars: ✭ 18 (-65.38%)
Mutual labels:  store
python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (-15.38%)
Mutual labels:  store
teaful
🍵 Tiny, easy and powerful React state management
Stars: ✭ 638 (+1126.92%)
Mutual labels:  store
vue-reactive-store
A VueX alternative : declarative + reactive + centralized way to structure your data store. Inspired by VueX and Vue.js . Compatible with vue-devtools.
Stars: ✭ 27 (-48.08%)
Mutual labels:  store
Open-Mam
Open Source Mobile Application Management (WORK IN PROGRESS)
Stars: ✭ 28 (-46.15%)
Mutual labels:  store
pterobilling
An open-source Laravel 8 online store, client area, and billing software specially made for Pterodactyl panel
Stars: ✭ 258 (+396.15%)
Mutual labels:  store
cmn-utils
公共函数&请求封装
Stars: ✭ 43 (-17.31%)
Mutual labels:  store
relite
a redux-like library for managing state with simpler api
Stars: ✭ 60 (+15.38%)
Mutual labels:  store

What is Vuex Easy Access?

  1. Zero boilerplate Vuex → auto generated actions & mutations!
  2. Unified syntax for accessing your store through simple set() and get()

Full documentation

Motivation

Vuex is great for state management in a VueJS app, however it requires a lot of boilerplating setting up your store and all actions and mutations.

The Vuex philosophy

The philosophy of Vuex is to do everything through mutations that will record a history of the changes you make to the store. This makes it possible to easily track changes when things go wrong as your app grows.

The Vuex Easy Access philosophy

Instead of having to write all actions and mutations for each change you make to the store, wouldn't it be great if an action and mutation is generated for you from the start? That's exactly what Vuex Easy Access does!

Vuex Easy Access automatically generates actions and mutations for each state property!

JavaScript Vuex Easy Access
In vanilla JavaScript you can simply do:
object.prop.nestedProp = newVal
why shouldn't you be able to do this with Vuex?
With Vuex Easy Access you can!
set('object.prop.nestedProp', newVal)

And the best part is, all state changes go through a mutation under the hood!

Features

  • Automatically generated actions & mutations to:
    • Set state values
    • Set nested state values
    • Delete values
    • Arrays: Push/shift/pop/splice values
    • Objects: use ID wildcards
  • Shorthand store.set() for all the above
  • Streamlined store.get() to get state valuess

Go to documentation

Short overview

1. auto-generated Vuex actions

_ actions generated from state
State props eg. state: {someProp: {nestedProp: ''}}
Set values
Set nested values

Delete values
dispatch('module/set/someProp', newVal)
dispatch('module/set/someProp.nestedProp', newVal)
dispatch('module/delete/someProp')
dispatch('module/delete/someProp.nestedProp')
Array props eg. state: {someArray: []}
Push/shift/pop/splice values dispatch('module/set/someArray.push', newVal)
dispatch('module/set/someArray.shift')
dispatch('module/set/someArray.pop')
dispatch('module/set/someArray.splice', [ind, del, newVal])
Objects with id wildcard eg. state: {someObject: {'*': ''}}
Set and delete dispatch('module/set/someObject.*', {[id]: newVal})
dispatch('module/delete/someObject.*', id)

2. Easy Access shorthand

_ available setters
State props eg. state: {someProp: {nestedProp: ''}}
Set values
Set nested values

Delete values
set('module/someProp', newVal)*
set('module/someProp.nestedProp', newVal)
delete('module/someProp')
delete('module/someProp.nestedProp')
Array props eg. state: {someArray: []}
Push/shift/pop/splice values set('module/someArray.push', newVal)
set('module/someArray.shift')
set('module/someArray.pop')
set('module/someArray.splice', [ind, del, newVal])
Objects with id wildcard eg. state: {someObject: {'*': ''}}
Set and delete set('module/someObject.*', {[id]: newVal})
delete('module/someObject.*', id)

* set() and delete() are attached to the Vuex store object: store.set()

Installation and setup →

Support

If you like what I built, you can say thanks by buying me a coffee! :)

Buy Me A Coffee

Thank you so much!! Every little bit helps.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].