Frontend2025년 5월 23일1분 읽기

Qwik 프레임워크 — 제로 로딩의 JavaScript 앱

YS
YoungSam
조회 370

Resumability란

Hydration 대신 Resumability를 사용합니다. 서버에서 직렬화된 상태를 클라이언트가 그대로 이어받아 JavaScript 부팅 비용이 없습니다.

기본 예제

import { component$, useSignal } from "@builder.io/qwik";

export const Counter = component$(() => {
  const count = useSignal(0);
  return (
    <button onClick$={() => count.value++}>
      Count: {count.value}
    </button>
  );
});

$ 접미사의 의미

$가 붙은 부분은 lazy-loading 경계입니다. 해당 코드는 필요할 때만 다운로드됩니다.

QwikResumabilityPerformance

댓글 0

아직 댓글이 없습니다.