All Projects → imanubhardwaj → Vue Entity Adapter

imanubhardwaj / Vue Entity Adapter

Licence: mit
Package to maintain entities in Vuex.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Entity Adapter

Vue Chat
👥Vue全家桶+Socket.io+Express/Koa2打造一个智能聊天室。
Stars: ✭ 887 (+4335%)
Mutual labels:  vuex, vuex2, vuejs2, vue2
Vuex Flash
VueJs Flash Message Component within Vuex
Stars: ✭ 54 (+170%)
Mutual labels:  vuex, vuex2, vuejs2, vue2
Vue Cnode
🔥Vue.js打造一个开源的CNode社区。CNode by Vue.js
Stars: ✭ 249 (+1145%)
Mutual labels:  vuex, vuex2, vuejs2, vue2
Vue Cnode
基于vue2 + vue-router + vuet + ES6 + less + flex.css重写vue版cnode社区,使用webpack2打包
Stars: ✭ 1,134 (+5570%)
Mutual labels:  vuex, vuex2, vuejs2, vue2
Vuetify Todo Pwa
✔️ A simple Todo PWA built with Vue CLI 3 + Vuex + Vuetify.
Stars: ✭ 160 (+700%)
Mutual labels:  vuex, vuejs2, vue2
Easy Vue
Learn vueJS Easily 👻
Stars: ✭ 896 (+4380%)
Mutual labels:  vuex, vuejs2, vue2
Vue2 Demo
Vue 基于 Genesis + TS + Vuex 实现的 SSR demo
Stars: ✭ 2,072 (+10260%)
Mutual labels:  vuex, vuejs2, vue2
Vuex I18n
Localization plugin for vue.js 2.0 using vuex as store
Stars: ✭ 657 (+3185%)
Mutual labels:  vuex, vuejs2, vue2
Vue Wechat
🔥 基于Vue2.0高仿微信App的单页应用
Stars: ✭ 1,832 (+9060%)
Mutual labels:  vuex, vuejs2, vue2
Paascloud Login Web
模拟商城,完整的购物流程、后端运营平台,使用 spring cloud + vue 全家桶实现快速搭建企业级微服务项目
Stars: ✭ 207 (+935%)
Mutual labels:  vuex, vuex2, vuejs2
Manhuaren
vue2.0全家桶,仿漫画人官网(移动端)
Stars: ✭ 18 (-10%)
Mutual labels:  vuex, vuex2, vuejs2
Cordova Template Framework7 Vue Webpack
Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Stars: ✭ 630 (+3050%)
Mutual labels:  vuex, vuejs2, vue2
Gpk admin
✨ GeekPark Content Management System
Stars: ✭ 150 (+650%)
Mutual labels:  vuex, vuejs2, vue2
Vue Objccn
🔥 Use Vue.js to develop a cross-platform full stack application / 用 Vue.js 开发的跨三端应用
Stars: ✭ 1,993 (+9865%)
Mutual labels:  vuex, vuejs2, vue2
Vuex Namespaced Module Structure
📈 A Vue.js project powered by Vuex namespaced modules in a simple structure based on Large-scale Vuex application structures
Stars: ✭ 146 (+630%)
Mutual labels:  vuex, vuejs2, vue2
Vuex Feature Scoped Structure
📈 Feature scoped Vuex modules to have a better organization of business logic code inside Vuex modules based on Large-scale Vuex application structures @3yourmind
Stars: ✭ 218 (+990%)
Mutual labels:  vuex, vuejs2, vue2
Vue Home
🏠 A simple project(Vue Community SPA) which bases on vue+vue-cli+vue-router+axios+ scss.
Stars: ✭ 256 (+1180%)
Mutual labels:  vuex, vuejs2, vue2
Vue Spotify
Spotify client built with vue.js / vuex
Stars: ✭ 407 (+1935%)
Mutual labels:  vuex, vuejs2, vue2
Vuex Simple Structure
📈 A repository showcasing a simple Vuex store inside a Vue.js application based on Large-scale Vuex application structures @3yourmind
Stars: ✭ 87 (+335%)
Mutual labels:  vuex, vuejs2, vue2
Vuemmerce
👉 Responsive ecommerce template 🛒 built with Vue.js and Nuxt.js
Stars: ✭ 223 (+1015%)
Mutual labels:  vuex, vuejs2, vue2

Note

This project is a fork of the project of Manu Bhardwaj, You can access the original project here.

The difference from this project to the original project, are just a few changes in the definitions for typescript and a small improvement in the ordering logic in the getAll method and in logic in addOne method.

Introduction

Entity State adapter for managing record collections.

Entity provides an API to manipulate and query entity collections.

Reduces boilerplate for creating reducers that manage a collection of models. Provides performant CRUD operations for managing entity collections. Extensible type-safe adapters for selecting entity information.

Example

Installation

Installing with npm

npm i vue-entity-adapter-plus

Getting Started

  • Create a EntityState

interface TodoState extends EntityState<Todo> {}

  • Create an EntityAdapter

const todoAdapter = new EntityAdapter<Todo>();

Adapter Methods

These methods are provided by the adapter object returned when using new EntityAdapter(). The methods are used inside your mutations to manage the entity collection based on your provided actions.

getInitialState

Returns the initialState for entity state based on the provided type. Additional state is also provided through the provided configuration object. The initialState is provided to your reducer function.

Entity Selectors

getOne

Returns the entity with the given id.

getAll

Returns all entities from the state.

getCount

Returns the number of entities from the state.

getIds

Returns the ids of entities from the state.

Adapter Collection Methods

The entity adapter also provides methods for operations against an entity. These methods can change one to many records at a time. Each method returns the newly modified state if changes were made and the same state if no changes were made.

  • addOne: Add one entity to the collection
  • addMany: Add multiple entities to the collection
  • addAll: Replace current collection with provided collection
  • removeOne: Remove one entity from the collection
  • removeMany: Remove multiple entities from the collection, by id or by predicate
  • removeAll: Clear entity collection
  • updateOne: Update one entity in the collection
  • updateMany: Update multiple entities in the collection
  • upsertOne: Add or Update one entity in the collection
  • upsertMany: Add or Update multiple entities in the collection
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].