Async Request State Machine (Reducer Pattern, Race-Safe)
Model async data fetching as a typed state machine to avoid ambiguous UI states and race conditions. The reducer pat...
<script setup lang="ts">
import { computed, onUnmounted, ref } from 'vue';
interface User {
id: number;
name: string;
}