Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<h2>Latest News</h2>
<p>{{ news }}</p>
export default {
async setup(props, context) {
const promise = new Promise((resolve) => {
setTimeout(function () {
resolve("Trump resigns");
}, 2000)
const news = await promise;
return {
<div id="app">
<img alt="Vue logo" src="./assets/logo.png">
<Fragments />
<template #default>
<LatestNews @newscomplete="newscomplete" />
<template #fallback>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment