/golgua.js

Store Management Framework of Javascript.

Primary LanguageJavaScriptMIT LicenseMIT

golgua-icon

Golgua.js ( version β )

Build Status npm version MIT License

Overview

Golgua is a store management framework for JavaScript.
Distributing and managing data and processing by type.

install

npm install golgua

or

yarn add golgua

Usage

import Golgua from "golgua";


class SampleState extends Golgua.State {
  constructor(){
    super();

    this.types = {
      message : Golgua.Types.string()
    }
  }

  willUpdate( props ){
    return {
      message : props.message + "!!";
    }
  }

}

const maker = createMaker( SampleState );

maker.listen( updated_data => {
  alert( update_data.message ); // Hello World!!
});

maker.update({ message : "Hello World" });

Contribution

License

MIT