Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add axios composable #1008

Open
damienroche opened this issue Oct 19, 2021 · 0 comments
Open

Feat/add axios composable #1008

damienroche opened this issue Oct 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@damienroche
Copy link

Hi there,
it would be nice to have access to a boolean like isFinished (like in vueUse/useAxios ) to indicates if the request is finished.
For example, this boolean can be useful is this case :

<template>
  <div>
    <div v-if="isFinished && items.length === 0>
      No items in database
      <button @click="createItem">Create your fist item</button>
    </div>
    <ul v-else>
      <li v-for="item in items">
        ....
      </li>
    </ul>
  </div>
</template>

<script lang="ts" setup>
const items = ref([])
const { isFinished, exec } = useAxios()
...
</script>
@pikax pikax added the enhancement New feature or request label Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants