Skip to content

useOptimistic ​

period
Unstable
Environment
Vue
Last updated
2024/06/04 08:18:39

Demo ​

Usage ​

ts
import { useOptimistic } from "@bernankez/utils/vue";

const { value, updating, lastUpdateStatus } = useOptimistic(0, {
  updateFn: () => Promise.resolve(Math.random())
});

Source ​

Source • Demo • Docs