Previous

Holds the previous value of a box or getter.

Demo

Previous: undefined

Usage

	<script lang="ts">
  import { Previous } from "runed";
 
  let count = $state(0);
  const previous = new Previous(() => count);
</script>
 
<button onclick={() => count++}>Count: {count}</button>
<pre>Previous: {`${previous.value}`}</pre>
 
 	
MIT

© 2024 Svecosystem Team