;
```
### Solid — Show / For (vs JSX)
```tsx
import { Show, For, Switch, Match } from 'solid-js';
}>
{(item) =>
{item.name}
}
Loading...ErrorDone
```
→ React 의 `{condition && ...}` 보다 명시.
### SolidStart (Next-like)
```tsx
// routes/users/[id].tsx
import { createAsync, useParams } from '@solidjs/router';
export default function UserPage() {
const params = useParams();
const user = createAsync(() => fetchUser(params.id));
return (
}>
{user()!.name}
);
}
// Server function
'use server';
async function fetchUser(id: string) {
return db.user.findUnique({ where: { id } });
}
```
### Qwik — Resumability
```tsx
import { component$, useSignal } from '@builder.io/qwik';
export default component$(() => {
const count = useSignal(0);
return (
);
});
```
→ `$` = lazy boundary. JS 가 사용자 click 까지 download 안 됨.
### Qwik 의 magic
```
Server: HTML + serialized state.
Client: 0 JS until 사용자 interacts.
Click: 그 handler만 download + execute.
→ Massive site = first paint 즉시.
```
### Qwik City (Next-like)
```tsx
// routes/users/[id]/index.tsx
import { component$, useSignal } from '@builder.io/qwik';
import { routeLoader$ } from '@builder.io/qwik-city';
export const useUserData = routeLoader$(async ({ params }) => {
return await db.user.findUnique({ where: { id: params.id } });
});
export default component$(() => {
const user = useUserData();
return
{user.value.name}
;
});
```
### Solid vs React (성능)
```
React: re-render entire component tree
Solid: update only specific DOM nodes (signals)
큰 list 의 1 item 변경:
React: 전체 list virtual DOM diff
Solid: 그 1 item DOM 만 update
→ Solid 가 5-10x 빠름 자주.
```
### Bundle size
```
React + ReactDOM: ~45 KB (gzip)
Solid: ~7 KB
Preact: ~3 KB
Svelte: ~3 KB (compile)
Qwik: 5 KB initial (lazy 더 download)
```
→ Mobile / slow network = 큰 차이.
### Svelte 5 (Runes)
```svelte
Doubled: {doubled}
```
→ Compile-time. 작은 bundle.
### Migration React → Solid (점진)
```
1. Solid 가 같은 mental model (component, props, state).
2. Hook 이름 다름 — useState → createSignal.
3. setState set 함수 — 같음.
4. JSX 같음.
5. 학습 1-2 day.
```
### React → Qwik
```
Qwik 가 React 비슷 + $ boundary.
큰 차이: serializable state.
```
### Suspense (data loading)
```tsx
// Solid
import { Suspense, ErrorBoundary } from 'solid-js';
}>
}>
```
```tsx
// Qwik
}
onResolved={(users) => }
/>
```
### Routing
```
Solid: @solidjs/router (file-based + dynamic)
Qwik: @builder.io/qwik-city (file-based)
React: TanStack Router / Next App Router
```
### State management
```
Solid:
- Signals (built-in)
- Stores (object)
Qwik:
- useSignal / useStore
→ External state (Redux 등) 보통 안 필요.
```
### Form
```tsx
// Solid
import { createSignal } from 'solid-js';
function Form() {
const [email, setEmail] = createSignal('');
return (
);
}
```
### Server actions (Qwik)
```tsx
import { routeAction$, Form } from '@builder.io/qwik-city';
export const useCreateUser = routeAction$(async (data) => {
return db.user.create({ data });
});
export default component$(() => {
const action = useCreateUser();
return (
);
});
```
### CSS / styling
```tsx
// Solid + Tailwind
...
// Solid + CSS module
import styles from './Card.module.css';
...
```
### Animation (Solid Motion)
```tsx
import { Motion, Presence } from 'solid-motionone';
Content
```
### Test
```ts
import { render } from '@solidjs/testing-library';
import { Counter } from './Counter';
test('increments', () => {
const { getByRole } = render(() => );
const button = getByRole('button');
expect(button).toHaveTextContent('0');
button.click();
expect(button).toHaveTextContent('1');
});
```
### Production usage
```
SolidJS:
- Codeium (AI), Builder.io
- 작지만 성장
Qwik:
- Builder.io
- 새로움
Svelte:
- Bloomberg, NYTimes, Apple
- 큰 ecosystem
→ React 가 dominant — but alternative 가치.
```
### Why migrate?
```
React 가 "충분히 빠름" 인 경우:
- 작은 / medium app
- 익숙한 팀
다른 framework 가치:
- Massive content site (Qwik)
- Performance critical (Solid)
- 작은 bundle (Svelte)
- 학습 / 호기심
```
### Deno / Bun 호환
```
모두 Node + Deno + Bun OK.
SolidStart / Qwik City = Vite 기반 — modern.
```
### Server / SSR
```
SolidStart: SSR + 점진 hydration
Qwik City: resumability (0 hydration)
SvelteKit: SSR + 점진 hydration
```
→ Qwik 의 resumability = 가장 modern.
### Adopt hesitation
```
- 작은 community → Stack Overflow 답 적음
- 일부 lib X (React 보다)
- Hire 어려움 (사람 React 더 많음)
- 점차 변경 — but learning curve
```
### Trial 권장
```
1. 작은 side project — Solid / Qwik 시도
2. Marketing site — Astro + Solid island
3. 적합 발견 시 main project 도
→ 점진. Risk 작음.
```
## 🤔 의사결정 기준
| 상황 | 추천 |
|---|---|
| Performance critical | SolidJS |
| 큰 content + 작은 interaction | Qwik |
| 작은 bundle + 단순 | Svelte 5 |
| 일반 / 큰 ecosystem | React |
| Migration React | Solid (가장 비슷) |
| New project (호기심) | Solid 또는 Qwik |
## ❌ 안티패턴
- **Solid signal 가 React state 같은 가정**: rendering 다름.
- **Qwik $ 잊음**: lazy boundary 안 됨.
- **모든 거 signal**: 의미 없음. local state.
- **Hire 무 plan**: 몇 명 만 알 = bus factor.
- **Big rewrite**: 점진 migration 더 안전.
- **React lib 가정**: 다른 ecosystem.
## 🤖 LLM 활용 힌트
- React 알면 Solid 쉬움 (1-2 day).
- Signal = fine-grained reactivity.
- Qwik = resumability (0 hydration).
- Svelte = compile-time.
## 🔗 관련 문서
- [[Perf_React_Reconciler]]
- [[Frontend_Progressive_Enhancement]]
- [[Frontend_Astro_Patterns]]