create-ref-value
v0.0.1
Published
Atomic entity for managing local variables in immutable style
Readme
create-ref
Atomic entity for managing local variables in immutable style
Install
npm install create-refcreateRef
import createRef from "create-ref";
const val = createRef(0);
val.get(); // 0
val.set(prev => prev + 1);
val.get(); // 1