1.0.2 • Published 5 years ago
@sebastbake/deep-state v1.0.2
Deprecated in favour of issimoteam/deep-state
A simple state store. Performs a deep comparison before calling the callbacks.
const state = State();
const cleanup = state.subscribe((prev, next) => {
// stuff
});
state.value = { foo: "bar" }; // trigger callback
state.value = { foo: "bar" }; // nothing