1.2.0 • Published 2 years ago

acid-reflux-js v1.2.0

Weekly downloads
10
License
MIT
Repository
github
Last release
2 years ago

acid-reflux-js

A simple library for uni-directional dataflow application architecture... inspired by Flux and Redux

npm version

See more in depth docs here

Example code...

var acidRefluxJS = require("acid-reflux-js")

// Create store
let store = new acidRefluxJS.Store();

// Subscribe to changes
store.subscribeToChanges((newState, oldState)=>{
    console.log("on any change", newState)
});

store.subscribeToChanges((newVal, oldVal)=>{
    console.log("isLoggedIn changed to...", newVal)
}, "isLoggedIn");

// Set time
store.setState({
    time: Date.now()
});

// Set time and isLoggedIn
store.setState({
    time: Date.now(),
    isLoggedIn: true
});

console.log("Full History", store.getFullHistory());

#Latest Changes

v1.2.0

  • Deprecated hook useAcidRefluxValue, use useStoreValue(...) instead
  • Added useStoreState, returns value, setValue(...)

v1.1.0

  • Added hook useAcidRefluxValue

v1.0.0 Changed build dir from /es5 to /lib Added improved TypeScript support

v0.3.2 Updating docs

v0.3.1 Fixed a bug in the TypeScript definition file

v0.3.0

Added state mapping More docs on this later

v0.2.0

Added State.maxHistoryLength Added state binding

v0.1.7

Added more docs using ESdoc wip

v0.1.6

Updated Change Log functions... internal property "__time" is now ignored

Log looks cleaner

v0.1.5

Added Change Log functions... More to come in the docs!

v0.1.4

Improved changed detection, now if a state property changes from one object to another that is identical, no change is registered

#Future Plans

  • More Docs
  • State change playback mode
1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

4 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1-alpha.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago