Debounced
A wrapper over `useDebounce` that returns a debounced state.
Demo
Search for something above!
Usage
This is a simple wrapper over useDebounce
that
returns a debounced state.
<script lang="ts">
import { Debounced } from "runed";
let search = $state("");
const debounced = new Debounced(() => search, 500);
</script>
<div>
<input bind:value={search} />
<p>You searched for: <b>{debounced.current}</b></p>
</div>