controllux

1.2.2 • Public • Published

Controllux

Now you can namespace your stores and actions with controllers:

  1. you can now make your own controllers that handle different states
  2. each controller has it's own defined actions (set by you)
  3. this helps namespace the flux api for your application
  4. you can call the state from any controller if you need it at any point in time
  5. Uses and Exposes Immutable JS so that one dependency is all that is needed to keep things immutable!

This helps you make more restful application actions on namespaced stores, since you can now reuse the same action names on different controllers

Grabbing Immutable JS


To grab Immutable JS simply:

const { imut } = Controllux

Heads Up!


It is immutable by default, and follows the vanilla Redux example (which subscribes to a simple render function that replaces the innerHTML of a certain element)

This library will early return and log an error message if your actions return a mutable object!


Example:

Here is an example on jsfiddle: https://jsfiddle.net/selfup/fq1k9vh4/

Another Example:

Here is the example on GitHub pages (custom domain): http://selfup.me/controllux

Here is the example on GitLab pages: https://selfup.gitlab.io/controllux

Take a look a the index.html in this repo for reference

Package Sidebar

Install

npm i controllux

Weekly Downloads

1

Version

1.2.2

License

MIT

Last publish

Collaborators

  • selfup