Created
February 19, 2024 16:11
-
-
Save dejurin/2768557da09b540926e4fb6f7fa3aebb to your computer and use it in GitHub Desktop.
Qwik Serialized
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
import { componentQrl, qrl } from "@builder.io/qwik"; | |
export const qwikSerialized = (dynamicImport, fn = "default") => { | |
return componentQrl(qrl(dynamicImport, fn)); | |
} | |
/* | |
import Stats from "~/components/widgets/Stats"; | |
import CallToAction from "~/components/widgets/CallToAction"; | |
import { qwikSerialized } from "~/utils/qwikSerialized"; | |
const IconBrandTailwind = qwikSerialized(() => import("../components/icons/IconBrandTailwind")); | |
const IconApps = qwikSerialized(() => import("../components/icons/IconApps")); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment