0.1.2 • Published 9 years ago

@mohayonao/fluxx v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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