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