UNPKG

eco-state

Version:

Light Weight Asynchronous JavaScript Eco friendly State Management Library.

12 lines (9 loc) 193 B
// global state let state = {}; // to get the current state export function getCurrentState() { return state; } export function setCurrentState(newState) { return state = newState; }