Skip to content

Instantly share code, notes, and snippets.

Always building stuff

Sam Hulick ffxsam

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