@mohayonao/fluxx

0.1.2 • Public • Published

FLUXX

Build Status NPM Version License

simple implementation of Flux architecture

Installation

npm install @mohayonao/fluxx

API

Router

  • constructor()

Instance attributes

  • actions: Action[]
  • stores: Store[]

Instance methods

Also implements methods from the interface @mohayonao/event-emitter.

  • getStateFromStores(): object
  • createAction(address: string, data: any): void
  • addChangeListener(listener: function): void
  • removeChangeListener(listener: function): void

Action

  • constructor(router: Router)

Instance attributes

  • router: Router

Instance methods

  • doneAction(address: string, data: any): void

Store

  • constructor(router: Router)

Instance attributes

  • router: Router
  • data: object
  • name: string

Instance methods

  • getInitialState(): object
  • getState(): object
  • emitChange(): void

LICENSE

MIT

Readme

Keywords

Package Sidebar

Install

npm i @mohayonao/fluxx

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • mohayonao