All Projects → infinum → mobx-collection-store

infinum / mobx-collection-store

Licence: MIT License
Data collection store for MobX

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to mobx-collection-store

Mobx Jsonapi Store
JSON API Store for MobX
Stars: ✭ 52 (+44.44%)
Mutual labels:  data-structure, mobx
Datx
DatX is an opinionated JS/TS data store. It features support for simple property definition, references to other models and first-class TypeScript support.
Stars: ✭ 111 (+208.33%)
Mutual labels:  collection, mobx
mobx-collection
Objects store for MobX
Stars: ✭ 14 (-61.11%)
Mutual labels:  collection, mobx
react-mobx-router5
React components for routing solution using router5 and mobx
Stars: ✭ 58 (+61.11%)
Mutual labels:  mobx
mobx
Код учебного курса “MobX & React” на YouTube-канале webDev (https://tinyurl.com/vt3tk6vy)
Stars: ✭ 23 (-36.11%)
Mutual labels:  mobx
mobx-form
Declarative, complex forms with Mobx/React with lots of dynamic/imperative hooks
Stars: ✭ 29 (-19.44%)
Mutual labels:  mobx
web-starter-kit
An opinionated starter kit with styled-system, graphql-hooks, mobx and nextjs (PWA)
Stars: ✭ 17 (-52.78%)
Mutual labels:  mobx
Programming-Reference
Open repository of programming topic for reverse engineering purpose.
Stars: ✭ 25 (-30.56%)
Mutual labels:  data-structure
react-douban
A React project
Stars: ✭ 21 (-41.67%)
Mutual labels:  mobx
aos-switch-ansible-collection
Ansible collection for AOS-Switch switches
Stars: ✭ 29 (-19.44%)
Mutual labels:  collection
micro-observables
A simple Observable library that can be used for easy state management in React applications.
Stars: ✭ 78 (+116.67%)
Mutual labels:  mobx
HBHybridCollectionView
Instead for SwipeTableView when using collection view.
Stars: ✭ 14 (-61.11%)
Mutual labels:  collection
react-native-mobx-feathers
A basic App using react-navigation + mobx + feathers
Stars: ✭ 31 (-13.89%)
Mutual labels:  mobx
react-mobx-router4-axios
react + less + webapck config + mobx(store)+ axios + router4
Stars: ✭ 24 (-33.33%)
Mutual labels:  mobx
NonEmptyCollections
A type-safe implementation for collections that cannot be empty. Life is too short for emptiness-checks!
Stars: ✭ 45 (+25%)
Mutual labels:  collection
fetchx
Beautiful way to fetch data in React
Stars: ✭ 71 (+97.22%)
Mutual labels:  mobx
laravel-any
🏓 Laravel collection macro that determine if `any` item from the collection passes the given truth test.
Stars: ✭ 38 (+5.56%)
Mutual labels:  collection
okdux
redux made ok 👌
Stars: ✭ 16 (-55.56%)
Mutual labels:  mobx
CoolSlidingMenu
A powerful menu that you can customize it。
Stars: ✭ 25 (-30.56%)
Mutual labels:  collection
FingerTree
A Scala implementation of the versatile purely functional data structure of the same name.
Stars: ✭ 59 (+63.89%)
Mutual labels:  data-structure

mobx-collection-store

Structured data store for MobX. Partially influenced by Backbone Collections.

Deprecation and migration

mobx-jsonapi-store and mobx-collection-store are deprecated in favor of datx - it follows the same concepts, but adds support for MobX 4 and 5, better TypeScript support and more extensibility.

If you're new to the libraries, check out the datx examples and docs.

If you already use mobx-collection-store, check out the migration guide.


Using JSON API? Check out mobx-jsonapi-store - All mobx-collection-store features, and JSON API helpers in one place.

Can be used with Redux DevTools.


Build Status Test Coverage npm version

Dependency Status devDependency Status Greenkeeper badge

Basic usage

import {Collection} from 'mobx-collection-store';

const collection = new Collection();

const john = collection.add({
  id: 1,
  firstName: 'John',
  lastName: 'Doe'
});

const jane = collection.add({
  id: 2,
  firstName: 'Jane',
  lastName: 'Doe'
});

console.log(collection.length); // 2

john.lastName = 'Williams';
console.log(john.lastName); // 'Williams'

For more advanced use-cases, check out the getting started guide, or the examples folder.

Installation

To install, use npm or yarn. The lib has a peer dependency of mobx 2.7.0 or later (including MobX 3).

npm install mobx-collection-store mobx --save
yarn add mobx-collection-store mobx

Since the lib is exposed as a set of CommonJS modules, you'll need something like webpack or browserify in order to use it in the browser.

Don't forget to prepare your code for production for better performance!

Getting started

The main idea behind the library is to have one instance of the collection that contains multiple model types. This way, there can be references between models that can handle all use cases, including circular dependencies.

API reference

The library contains the following elements:

License

The MIT License

Credits

mobx-collection-store is maintained and sponsored by Infinum.

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].