Skip to content

Instantly share code, notes, and snippets.

@ShariqT
Last active December 6, 2021 23:24
Show Gist options
  • Save ShariqT/518be3c633f100635a9134d63b1d88e1 to your computer and use it in GitHub Desktop.
Save ShariqT/518be3c633f100635a9134d63b1d88e1 to your computer and use it in GitHub Desktop.
list-postcard.vue
<script setup>
import { ref, onMounted } from "vue";
const postcards = ref([]);
onMounted(() => {
fetch("http://localhost:3030/postcard/list")
.then((data) => data.json())
.then((data) => (postcards.value = data.postcards));
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment