✨ Features
React 18 | Event Driven Pub/Sub | Integration API |
Web | Synchronous State | Live Inspect Devtool |
Angular | Working Offline | Persistency |
Flutter | Sync any backend | Middlewares |
NodeJS | No dependency | |
Typescript | Very small | |
Javascript |
📦 Install
$ npm install @infini-store/core --save
# or
$ yarn add @infini-store/core
Skip to code
S ExamplesLet'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.
Skip to code
ContextHappyness 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
Documentation
🌊 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)
Powered
Futur is now? Join us [https://www.infinisoft.world]