1.3.0 • Published 1 year ago

@infini-store/core v1.3.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
1 year ago

https://s3.amazonaws.com/storage.infini-soft.com/banner1.gif

✨ Features

React 18Event Driven Pub/SubIntegration API
WebSynchronous StateLive Inspect Devtool
AngularWorking OfflinePersistency
FlutterSync any backendMiddlewares
NodeJSNo dependency
TypescriptVery small
Javascript

📦 Install

$ npm install @infini-store/core --save
# or
$ yarn add @infini-store/core

S Examples Skip to code

Let's pretend you are Chief Technology Officer of Infinisoft Inc and following scenario is happening right now. Happyness Service is responsible of creating and onboarding new talents. Security Department is responsible for access management in our meta verse. Our head office has 2349 floors because we offer an entire floor per person.

Context Skip to code

Happyness Service

  • Hire
  • Onboard

Security Service

  • Manage Credentials & Metaphysical Accesses

Food Service

  • Order food

Veteran Service

  • Veteran things

Code

For simplicity, let's have store global.

exports.store = Store
    import {Store} from "@infini-store/core"
    const _store = Store("initial");

    _store.subscribe("simple", (event, payload)=>{console(`event called `, e,`payload `, payload)});
    _store.emit("simple", "with infinistore");
$ ts-node simple.ts
event called simple payload with infinistore

Devtool

Open devtool by pressing F12 in your browser. Make sure to install Redux Devtools

https://s3.amazonaws.com/storage.infini-soft.com/devtool.gif

Documentation

./assets//lifecyclev4.gif

./assets/subscription_lifecycle.gif

🌊 Infinistore

First no dependency, synchronous event driven, micro state management ecosystem. Under research & development since 2020, this design pattern is a game changer, decreasing software complexiity significantly.

Scalability is one of the most challenging topic in software engineering. Each line of code added increase complexity making it harder and harder to progress. Adding boilerplate required to handle asynchronous request, its errors, and multiple status is always cumbersumb, hard to understand and useless.

Things like progress bar, loadings, spinners, skeletons, save, edit buttons are not natural. These components were created by engineers, to cope the technicals problem surrounding asynchronous nature of requests. They considerably decrease user and developers experience.

We though about a lightweight synchronous state management where loading is something from the past.

⚠️ Warning

This package is prerelease and still under active development.
Look out for the white paper coming soon. Subscribe to get your early copy.

API

Following is how to perform CRUD operations towards the store.


Create Stores

const store = Store()

Read Store

getState(state=>state)

Write Store

mutate(state=>state)

Emit

emit(event, payload)

Register

Add a new middleware register()

Subscribe

Subcscribe to 1 event. subscribe(evvent, handler)

SubscribeAll

Subscribe to all event subscribeAll(handler)


1.3.0

1 year ago

1.2.80

1 year ago

1.2.41

1 year ago

1.2.42

1 year ago

1.2.40

1 year ago

1.2.45

1 year ago

1.2.46

1 year ago

1.2.43

1 year ago

1.2.44

1 year ago

1.2.49

1 year ago

1.2.47

1 year ago

1.2.48

1 year ago

1.2.52

1 year ago

1.2.53

1 year ago

1.2.50

1 year ago

1.2.51

1 year ago

1.2.56

1 year ago

1.2.54

1 year ago

1.2.58

1 year ago

1.2.60

1 year ago

1.2.62

1 year ago

1.2.23

2 years ago

1.2.68

1 year ago

1.2.24

2 years ago

1.2.21

2 years ago

1.2.66

1 year ago

1.2.22

2 years ago

1.2.27

1 year ago

1.2.28

1 year ago

1.2.25

1 year ago

1.2.26

1 year ago

1.2.29

1 year ago

1.2.70

1 year ago

1.2.74

1 year ago

1.2.30

1 year ago

1.2.31

1 year ago

1.2.72

1 year ago

1.2.78

1 year ago

1.2.34

1 year ago

1.2.35

1 year ago

1.2.76

1 year ago

1.2.32

1 year ago

1.2.33

1 year ago

1.2.38

1 year ago

1.2.39

1 year ago

1.2.36

1 year ago

1.2.37

1 year ago

1.2.20

2 years ago

1.2.19

2 years ago

1.2.17

2 years ago

1.2.16

2 years ago

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.21

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago