# useAsync WIP

<template>
  <pre>
    {{ promise }}
  </pre>
</template>

<script>
import { defineComponent } from 'vue'
import { useAsync } from 'vuetensils/src/composables'
const url = 'https://jsonplaceholder.typicode.com/posts/1';

export default defineComponent(() => {
  const promise = useAsync(fetch(url).then((response) => response.json()));
  
  return {
    promise
  };
});
</script>
Last Updated: 6/3/2021, 7:36:14 PM