Skip to content

Instantly share code, notes, and snippets.

@SidneyAllen
Last active October 29, 2021 18:11
Show Gist options
  • Save SidneyAllen/22391e7300695745137a51bfa2627bee to your computer and use it in GitHub Desktop.
Save SidneyAllen/22391e7300695745137a51bfa2627bee to your computer and use it in GitHub Desktop.
// src/components/ListTemplates.vue
<script setup>
import { reactive, onMounted } from "vue";
const templates = reactive({});
onMounted(() => {
fetch("http://localhost:3030/templates")
.then((data) => data.json())
.then((data) => (templates.value = data));
});
</script>
<template>
<p>We will show the list of templates here</p>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment