Skip to content

Instantly share code, notes, and snippets.

View ffxsam's full-sized avatar
🤓
Always building stuff

Sam Hulick ffxsam

🤓
Always building stuff
View GitHub Profile
@ffxsam
ffxsam / Suspense.ts
Last active May 22, 2024 17:48
Vue 3's Suspense component, ready for use in Vue 2.x (TypeScript)
import Vue from 'vue';
export const Suspense = Vue.extend({
name: 'Suspense',
data: () => ({
resolved: false,
}),
async created() {
const setupMethod = (this.$parent as any).setup;
if (!setupMethod) {