doa-global-store
v1.0.2
Published
Library to quickly and easily manage global variables in a React app
Readme
doa-global-store
Description
doa-global-store is a lightweight library for React that allows you to save and read global values using simple JavaScript functions, without the need to set up Context, Redux, or other complex configurations.
With this library, you can easily write and access global data (strings, numbers, objects, arrays) throughout your React application.
Installation
You can install doa-global-store via npm:
npm install doa-global-storeUsage
# Usage for writing global variables
import { writeGlobalValue, readGlobalValue } from 'doa-global-store';
writeGlobalValue('valueExemple', 42);
## Usage for reading global variables
console.log(readGlobalValue('valueExemple')); // Output: 42