5.0.13 • Published 4 months ago

event-storm v5.0.13

Weekly downloads
32
License
MIT
Repository
github
Last release
4 months ago

publish codecov

Introduction to Event Storm

The Event Storm is a tiny store implementation with pure javascript. Event Storm will help to organize and manage your application's state. The library is deigned to be framework and platform agnotics, which empowers an ability to use it, in any Javascript runtime.

There is an official React wrapper of the Event Storm.

When to use Event Storm?

  • Large scale application with a lot of data consumers(1K+)
  • The application is doing a lot of CPU intensive computations
  • The bundle size limited applications(library size 2kb)
  • Microservice applications(no matter using the same technology for microservices or not)

Installation

To install the library run:

# npm
npm i event-storm

# yarn
yarn add event-storm

Simple example

import { createStorm } from 'event-storm';

const defaultState = {
  name: 'Event Storm',
  isActive: false,
}

const storm = createStorm(defaultState);

// subscribing to listen all the changes
storm.subscribe((state, access) => console.log(access(storm)));

// subscribing to listen only partial changes
storm.subscribe((state, access) => console.log(access(storm.name)));

// update the state
storm.dispatch({ name: 'Event Storm - manage your state effectively' });

// use previous state to make the updates
storm.dispatch(prev => ({ isActive: !prev.isActive }));

See it in action

Examples:

Documentation

5.0.13

4 months ago

5.0.12

5 months ago

5.0.9

2 years ago

5.0.10

2 years ago

5.0.11

2 years ago

4.0.0

2 years ago

5.0.8

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

3.0.0

2 years ago

2.0.0-beta0

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.8.4

3 years ago

0.9.0-beta

3 years ago

0.9.0

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.7.2

3 years ago

0.8.0

3 years ago

0.7.0-alpha

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.1.0-beta

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago