The Pattern It replaces

function UserProfile({ userId }: { userId: string }) {

const [user, setUser] = useState<User | null>(null);

const [isLoading, setIsLoading] = useState(true);

const [error, setError] = useState<Error | null>(null);