2.2.13 • Published 9 months ago

sixe v2.2.13

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

SIXE

Lightweight State Management Library for Angular, React, Vue and others

SIXE

SIXE is a global state management tool built on top of typescript, that helps your client application manage its state regardless of the web framework/library you use,

Features

  • Works on top of any frontend typescript framework/library
  • State is outside main thread - runs in seperate thread for Performace
  • Maintains State aross tabs and windows - state managed in shared worker
  • Lightweight - Low unpack size
  • No dependencies

Tech

Checkout SIXE's Git Repo - [public repository] on GitHub.

Usage

/* to initialize the service Appname is optional */
var stateService = new SixeStateService('AppName');

/* to set/update state */
this.stateService.setState({
  name: 'sixe',
  data : ['grapes', 'tomato']
});

/* to listen to events that changes the state */
stateService.sixe.onmessage = (event:any) => {
    let state = event?.data;
    console.log(state)
};

/* 
 Must add this code on events such as "beforeunload" or "unload" so that it clears the state
*/
window.addEventListener("beforeunload", function(event) {
  if (!this.state || this.state.connections == 1) stateService.close();
});

Note :

  • Angular users might need to run NgZone inside onmessage event function to get their state properly,
  • others can use their reactive variables to save/use the state you get from onmessage event function.

Examples (Angular ,React, Vue)

https://stackblitz.com/@BruceArmstrong007/collections/sixe-typescript-state-management-tool

Example in Angular - https://github.com/BruceArmstrong007/SIXE-Example-Angular-

Installation

to Install SIXE

npm i sixe 
or
npm i sixe@latest

Support

  • All major desktop browers - Chrome, Edge, Firefox, Opera, Safari
  • Few mobile browsers - Firefox for Android, Safari on iOS

For more details visit mdn web docs

License

MIT

Issues

Raise issues here - github/issues

Image for multi window state management

2.2.1

9 months ago

2.2.0

9 months ago

2.2.3

9 months ago

2.2.2

9 months ago

2.2.13

9 months ago

2.2.5

9 months ago

2.2.4

9 months ago

2.2.11

9 months ago

2.2.7

9 months ago

2.2.12

9 months ago

2.2.6

9 months ago

2.2.10

9 months ago

2.2.9

9 months ago

2.2.8

9 months ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.9.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago