Skip to content

Commit

Permalink
docs: migration from v2.0 to v2.1 page translated into Korean
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaic4o committed Nov 18, 2024
1 parent dd7be18 commit 3cf1a62
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
sidebar_position: 3
---

# v2.0μ—μ„œ v2.1둜의 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜

v2.1μ—μ„œ κ°€μž₯ 큰 λ³€ν™”λŠ” pages first μ ‘κ·Ό 방식을 톡해 μΈν„°νŽ˜μ΄μŠ€λ₯Ό λΆ„ν•΄ν•˜λŠ” μƒˆλ‘œμš΄ 사고방식을 λ„μž…ν•œ μ μž…λ‹ˆλ‹€.

v2.0μ—μ„œλŠ” FSDκ°€ μΈν„°νŽ˜μ΄μŠ€μ˜ 엔티티와 κΈ°λŠ₯을 μ‹λ³„ν•˜κ³ , μ—”ν‹°ν‹° ν‘œν˜„κ³Ό μƒν˜Έμž‘μš©μ„ κ°€μž₯ μž‘μ€ λ‹¨μœ„λ‘œ λΆ„ν•΄ν•˜λ„λ‘ ꢌμž₯ν–ˆμŠ΅λ‹ˆλ‹€. 이후, μ΄λŸ¬ν•œ 엔티티와 κΈ°λŠ₯을 λ°”νƒ•μœΌλ‘œ μœ„μ ―κ³Ό νŽ˜μ΄μ§€λ₯Ό κ΅¬μΆ•ν–ˆμŠ΅λ‹ˆλ‹€. 이 λΆ„ν•΄ λͺ¨λΈμ—μ„œλŠ” λŒ€λΆ€λΆ„μ˜ 둜직이 엔티티와 κΈ°λŠ₯에 μ§‘μ€‘λ˜μ–΄ μžˆμ—ˆκ³ , νŽ˜μ΄μ§€λŠ” 자체적으둜 큰 의미λ₯Ό 가지지 μ•ŠλŠ” λ‹¨μˆœν•œ ꡬ성 κ³„μΈ΅μœΌλ‘œ μ—¬κ²¨μ‘ŒμŠ΅λ‹ˆλ‹€.

v2.1μ—μ„œλŠ” νŽ˜μ΄μ§€λ₯Ό 좜발점으둜 μ‚Όκ³ , κ°€λŠ₯ν•˜λ©΄ κ±°κΈ°μ„œ 멈좜 것을 ꢌμž₯ν•©λ‹ˆλ‹€. λŒ€λΆ€λΆ„μ˜ μ‚¬μš©μžλŠ” 이미 앱을 κ°œλ³„ νŽ˜μ΄μ§€λ‘œ λ‚˜λˆ„λŠ” 방법을 μ•Œκ³  있으며, μ½”λ“œλ² μ΄μŠ€ λ‚΄ μ»΄ν¬λ„ŒνŠΈλ₯Ό 찾을 λ•Œλ„ νŽ˜μ΄μ§€κ°€ 일반적인 μ‹œμž‘μ μœΌλ‘œ μ‚¬μš©λ©λ‹ˆλ‹€. 이 μƒˆλ‘œμš΄ λΆ„ν•΄ λͺ¨λΈμ—μ„œλŠ” 각 νŽ˜μ΄μ§€μ— λŒ€λΆ€λΆ„μ˜ UI와 λ‘œμ§μ„ μœ μ§€ν•˜λ©°, Sharedμ—μ„œλŠ” μž¬μ‚¬μš© κ°€λŠ₯ν•œ 기반만 κ΄€λ¦¬ν•©λ‹ˆλ‹€. μ—¬λŸ¬ νŽ˜μ΄μ§€μ—μ„œ λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ μž¬μ‚¬μš©ν•΄μ•Ό ν•  ν•„μš”κ°€ 생길 κ²½μš°μ—λ§Œ ν•˜μœ„ κ³„μΈ΅μœΌλ‘œ μ΄λ™ν•©λ‹ˆλ‹€.

Feature-Sliced Design(v2.1)μ—μ„œλŠ” μ—”ν‹°ν‹° κ°„ ꡐ차 κ°€μ Έμ˜€κΈ°λ₯Ό ν‘œμ€€ν™”ν•˜κΈ° μœ„ν•΄ `@x` ν‘œκΈ°λ²•μ΄ λ„μž…λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

## λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ 방법 {#how-to-migrate}

v2.1은 ν•˜μœ„ ν˜Έν™˜μ„±μ„ μœ μ§€ν•˜λ―€λ‘œ, FSD v2.0으둜 μž‘μ„±λœ ν”„λ‘œμ νŠΈλŠ” FSD v2.1μ—μ„œλ„ μœ νš¨ν•©λ‹ˆλ‹€. λ”°λΌμ„œ v2.1둜의 μ „ν™˜μ€ κΈ°μ‘΄ ν”„λ‘œμ νŠΈμ˜ κΈ°λŠ₯에 영ν–₯을 λ―ΈμΉ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ‹€λ§Œ, μƒˆλ‘œμš΄ Mental Model이 νŒ€ μ „λ°˜, 특히 μƒˆλ‘œμš΄ 개발자의 μ˜¨λ³΄λ”©μ— 더 μœ μ΅ν•˜λ‹€κ³  νŒλ‹¨λ˜λ―€λ‘œ, λΆ„ν•΄ 방식에 μ•½κ°„μ˜ 쑰정을 ꢌμž₯ν•©λ‹ˆλ‹€.

### 슬라이슀 병합

μ‹œμž‘ν•˜λŠ” κ°„λ‹¨ν•œ 방법은 우리의 linter [Steiger][steiger]λ₯Ό ν”„λ‘œμ νŠΈμ—μ„œ μ‹€ν–‰ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. SteigerλŠ” μƒˆλ‘œμš΄ λ©˜νƒˆ λͺ¨λΈλ‘œ κ΅¬μΆ•λ˜μ—ˆμœΌλ©°, κ°€μž₯ μœ μš©ν•œ κ·œμΉ™μ€ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€:

- [`insignificant-slice`][insignificant-slice] β€” νŠΉμ • μ—”ν‹°ν‹°λ‚˜ κΈ°λŠ₯이 단 ν•˜λ‚˜μ˜ νŽ˜μ΄μ§€μ—μ„œλ§Œ μ‚¬μš©λ  경우, 이λ₯Ό ν•΄λ‹Ή νŽ˜μ΄μ§€μ— μ™„μ „νžˆ λ³‘ν•©ν•˜λ„λ‘ ꢌμž₯ν•©λ‹ˆλ‹€.
- [`excessive-slicing`][excessive-slicing] β€” 계측에 μ§€λ‚˜μΉ˜κ²Œ λ§Žμ€ μŠ¬λΌμ΄μŠ€κ°€ ν¬ν•¨λœ 경우, μ΄λŠ” κ³Όλ„ν•œ μ„ΈλΆ„ν™”μ˜ μ‹ ν˜ΈμΌ 수 μžˆμŠ΅λ‹ˆλ‹€. 이 κ·œμΉ™μ€ ν”„λ‘œμ νŠΈ 탐색을 μš©μ΄ν•˜κ²Œ ν•˜κΈ° μœ„ν•΄ 일뢀 슬라이슀λ₯Ό λ³‘ν•©ν•˜κ±°λ‚˜ κ·Έλ£Ήν™”ν•˜λ„λ‘ μ œμ•ˆν•©λ‹ˆλ‹€.

```bash
npx steiger src
```

이λ₯Ό 톡해 ν•œ 번만 μ‚¬μš©λ˜λŠ” 슬라이슀λ₯Ό μ‹λ³„ν•˜κ³ , ν•΄λ‹Ή μŠ¬λΌμ΄μŠ€κ°€ 정말 ν•„μš”ν•œμ§€ λ‹€μ‹œ κ²€ν† ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ΄λ•Œ, 계측이 κ·Έ μ•ˆμ— ν¬ν•¨λœ λͺ¨λ“  μŠ¬λΌμ΄μŠ€μ— λŒ€ν•΄ μΌμ’…μ˜ μ „μ—­ λ„€μž„μŠ€νŽ˜μ΄μŠ€ 역할을 ν•œλ‹€λŠ” 점을 κΈ°μ–΅ν•΄μ•Ό ν•©λ‹ˆλ‹€. ν•œ 번만 μ‚¬μš©λ˜λŠ” λ³€μˆ˜κ°€ μ „μ—­ λ„€μž„μŠ€νŽ˜μ΄μŠ€λ₯Ό μ˜€μ—Όμ‹œν‚€μ§€ μ•Šλ„λ‘ μ£Όμ˜ν•˜λ“―, 계측 λ‚΄ λ„€μž„μŠ€νŽ˜μ΄μŠ€μ˜ μœ„μΉ˜λ„ κ·€μ€‘ν•œ μžμ›μœΌλ‘œ κ°„μ£Όν•˜κ³  μ‹ μ€‘ν•˜κ²Œ ν™œμš©ν•΄μ•Ό ν•©λ‹ˆλ‹€.

### ꡐ차 κ°€μ Έμ˜€κΈ° ν‘œμ€€ν™”

κΈ°μ‘΄ ν”„λ‘œμ νŠΈμ—μ„œ ꡐ차 κ°€μ Έμ˜€κΈ°λ₯Ό μ‚¬μš©ν•œ 적이 μžˆλ”λΌλ„ κ±±μ •ν•˜μ§€ λ§ˆμ„Έμš”. 이제 Feature-Sliced Design의 μƒˆλ‘œμš΄ ν‘œμ€€ ꡐ차 κ°€μ Έμ˜€κΈ° 방식인 `@x-` ν‘œκΈ°λ²•μ„ λ„μž…ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 ν‘œκΈ°λ²•μ€ λ‹€μŒκ³Ό 같은 ν˜•νƒœλ‘œ ν™œμš©λ©λ‹ˆλ‹€:

```ts title="entities/B/some/file.ts"
import type { EntityA } from "entities/A/@x/B";
```

더 μžμ„Έν•œ λ‚΄μš©μ€ μ°Έκ³  λ¬Έμ„œμ˜ [ꡐ차 κ°€μ Έμ˜€κΈ°μš© Public API][public-api-for-cross-imports] μ„Ήμ…˜μ„ ν™•μΈν•˜μ„Έμš”.

[insignificant-slice]: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/insignificant-slice
[steiger]: https://github.com/feature-sliced/steiger
[excessive-slicing]: https://github.com/feature-sliced/steiger/tree/master/packages/steiger-plugin-fsd/src/excessive-slicing
[public-api-for-cross-imports]: /docs/reference/public-api#public-api-for-cross-imports




0 comments on commit 3cf1a62

Please sign in to comment.