Socket
Socket
Sign inDemoInstall

ampersand-state-fluxible-mixin

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ampersand-state-fluxible-mixin

This module implements the `dehydrate` and `rehydrate` methods for [Ampersand.js][] states and models to be used as [Fluxible][fluxible] Stores.


Version published
Maintainers
1
Install size
4.47 kB
Created

Readme

Source

Ampersand State 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 model with the mixin and set the storeName for Fluxible:

// MyModel.js

var Model = require("ampersand-model");
var mixin = require("ampersand-model-fluxible-mixin");

var MyModel = Model.extend(mixin, {
  props: {
    that: "string"
  }
});

MyModel.storeName = "MyModel";

module.exports = MyModel;

Then, register your model with Fluxible:

// app.js

var Fluxible = require("fluxible");
var MyModel = require("./MyModel");

var app = new Fluxible({ /* options... */ });

app.registerStore(MyModel);

module.exports = app;

You may then use Fluxible according to the API.

License

MIT

Keywords

FAQs

Last updated on 16 Jun 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc