/chista-state-manager

Simple state manager based on rxjs

Primary LanguageTypeScript

ChistaData State Manager

This is a simple state manager based on rxjs.

Useage

Create

/* Creates a atomic store based on BehaviorSubject from 'rxjs' */
const count$ = atom(0);

Subscribe

/* Subscribe to the atomic store and listen for events */
count$.subscribe(value => {
    // Do application logic whenever the store changes
    document.getElementById("counter").innerText = `Count : ${value}`;
});

Get value

count$.get()

Set value

// count$.set(<new-value>);
count$.set(count$.get() + 1);

Reference Links

Get Started

Install dependencies

pnpm install

Build application

pnpm build 

Testing

pnpm test 

Documentation

Please refer the following links :

Rules

TBD

Get started

TBD

Who uses it?

TBD