global-store-manager
v1.0.3
Published
manages global store for your project
Downloads
2
Maintainers
Readme
3B2R9u6dpJyWB4U6iDWC14y9yejnF5hsSN
Global Store Manager
This package helps you to store any object like state, prop etc. so that you can simply assign it from one component and use it on another component.
Package Installation
npm install global-store-manager
Package Usage
Create store.ts on your project
import { GlobalStoreManager } from 'global-store-manager'; export const globalStoreManager = new GlobalStoreManager();
Attach your global object, state, prop anything on some component, you can also update the store with reattaching the object
globalStoreManager.attachGlobalObject(this, "userDialog");
And you can call that object you attached with using the name you assigned on any component
const {userDialog} = globalStoreManager.getGlobalStore(); userDialog.openDialog(user, action);
You can clean the global store
globalStoreManager.cleanGlobalStore();
Tech Stack
Authors
- Fatih Türker
Sponsors
No sponsors yet! Will you be the first?
Contributors
No contributers yet! Will you be the first?
License
MIT