Consider a component that fetches data. Instead of managing state with multiple
booleans
(`const [isLoading, setIsLoading] = useState(true); const [isError, setIsError] = useState(false);`),
an FSM approach would use a single state object:

