Ampersand Collection Fluxible Mixin
This module implements the dehydrate
and rehydrate
methods for
Ampersand.js states and models to be used as Fluxible Stores.
Install
npm install --save ampersand-model-fluxible-mixin
Usage
Define your collection with the mixin and set the storeName
for Fluxible:
// MyModel.js var MyModel = ;var Collection = ;var mixin = ; var MyCollection = Collection; MyCollectionstoreName = "MyCollection"; moduleexports = MyCollection;
Then, register your model with Fluxible:
// app.js var Fluxible = ;var MyCollection = ; var app = /* options... */ ; app; moduleexports = app;
You may then use Fluxible according to the API.
License
MIT