web-meta-framework-qwik
Qwik Framework Patterns
Quick Guide: Qwik is resumable - it serializes application state on the server and resumes on the client without re-executing framework code (no hydration). Every
$suffix marks a lazy-loading boundary where the optimizer splits code into separate chunks. Only the code for the interaction the user triggers gets downloaded. Usecomponent$for all components,useSignal/useStorefor state,routeLoader$for server data,routeAction$for mutations, andserver$for ad-hoc server RPC. The critical mental model: anything crossing a$boundary must be serializable.
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST wrap every component in component$() - plain functions cannot be lazy-loaded, cannot use hooks, and cannot use <Slot />)
(You MUST ensure all values captured in a $ closure are serializable - non-serializable captures pass type-checking but fail at runtime)
(You MUST use routeLoader$ for initial server data instead of fetching in useTask$ or useResource$ - loaders run before render and integrate with SSR streaming)
(You MUST use preventdefault:click as a JSX attribute instead of calling event.preventDefault() - event handlers load asynchronously so synchronous Event APIs are unavailable)