Last active
December 6, 2021 23:24
-
-
Save ShariqT/518be3c633f100635a9134d63b1d88e1 to your computer and use it in GitHub Desktop.
list-postcard.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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