Building with Qwik v2
A short tour of the Qwik v2 primitives Publier uses — component$, signals, and resumability.
By Publier Team
Publier’s interactive surface is built on Qwik v2. Three concepts explain why a Publier site feels instant: component$, signals, and resumability.
component$ and the dollar sign
In Qwik, every UI component is declared with component$(). The $ suffix is not decoration — it marks the function as a lazy-loadable boundary. Qwik serializes the application state on the server and resumes execution in the browser only where interaction happens.
import { component$, useSignal } from '@qwik.dev/core';
export const Counter = component$(() => { const count = useSignal(0);
return ( <button onClick$={() => count.value++}> Clicks: {count.value} </button> );});The onClick$ handler isn’t downloaded until the button is clicked. On a read-heavy documentation site, most JavaScript never executes at all.
Signals
Qwik uses signals for reactive state. useSignal() holds a single value; useStore() holds a reactive object. Unlike a virtual DOM, Qwik tracks signal subscriptions and updates only the DOM nodes that actually changed.
const isOpen = useSignal(false);const sidebar = useStore({ width: 280, pinned: true });Mutating sidebar.pinned = false re-renders only the components that read sidebar.pinned.
Resumability
Traditional SSR frameworks hydrate: they re-run all component code in the browser to attach event listeners. On a large docs site, hydration can block interactivity for seconds.
Qwik serializes the listener map and component state into the HTML. The browser picks up where the server left off — no re-execution. For a Publier site, that means the AI assistant and any custom Qwik widgets are interactive the moment the page is visible, regardless of bundle size.
Last updated