@sebastbake/deep-statedeprecated

A simple state store. Performs a deep comparison before calling the callbacks.

Usage no npm install needed!

<script type="module">
  import sebastbakeDeepState from 'https://cdn.skypack.dev/@sebastbake/deep-state';
</script>

README

Deprecated in favour of issimoteam/deep-state

A simple state store. Performs a deep comparison before calling the callbacks.

size downloads npm GitHub

const state = State();

const cleanup = state.subscribe((prev, next) => {
  // stuff
});

state.value = { foo: "bar" }; // trigger callback
state.value = { foo: "bar" }; // nothing