Reversible state changes for Node & Browser