Skip to content

Instantly share code, notes, and snippets.

@dejurin
Created February 19, 2024 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dejurin/2768557da09b540926e4fb6f7fa3aebb to your computer and use it in GitHub Desktop.
Save dejurin/2768557da09b540926e4fb6f7fa3aebb to your computer and use it in GitHub Desktop.
Qwik Serialized
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