@w5s/application
W5S Application management (@w5s/application)
Installation
npm install @w5s/application
Usage
import { useStorage, useRef } from '@w5s/application';
export function main(): void {
const globalStorage = useStorage(globalThis);
const counterRef = useRef(globalStorage, 'counter', 1);
counterRef.current += 1;
console.log(counterRef.current); // 2
console.log(globalStorage.get('counter')); // 2
}
License
MIT © Julien Polo julien.polo@gmail.com
Application id type