@@ -117,21 +117,13 @@ Suspenseλ μμ λ¬Έμ μ λν κΈ°μ‘΄μ μ κ·Ό λ°©μκ³Όλ μλΉν λ€
117
117
118
118
### Suspenseλ‘ κ°λ₯ν κ² {#what-suspense-lets-you-do}
119
119
120
- <<<<<<< HEAD
121
- So what's the point of Suspense? There are a few ways we can answer this:
122
- =======
123
120
κ·Έλ λ€λ©΄ Suspenseλ μ μ¬μ©νλ κ²μΌκΉμ? μ΄μ λν λͺ κ°μ§ λ΅μ΄ μμ΅λλ€.
124
- >>>>>>> initial draft of translation
125
121
126
122
* ** λ°μ΄ν° λΆλ¬μ€κΈ° λΌμ΄λΈλ¬λ¦¬λ€μ΄ Reactμ κΉκ² κ²°ν©ν μ μλλ‘ ν΄μ€λλ€.** λ°μ΄ν° λΆλ¬μ€κΈ° λΌμ΄λΈλ¬λ¦¬κ° Suspense μ§μμ ꡬννλ€λ©΄, React μ»΄ν¬λνΈμμ μ΄λ₯Ό μ¬μ©νλ κ²μ΄ μμ£Ό μμ°μ€λ½κ² λκ»΄μ§ κ²μ
λλ€.
127
123
128
124
* ** μλμ μΌλ‘ μ€κ³λ λ‘λ© μνλ₯Ό μ‘°μ ν μ μλλ‘ ν΄μ€λλ€.** Suspenseλ λ°μ΄ν°κ° _ μ΄λ»κ²_ λΆλ¬μ ΈμΌ νλμ§λ₯Ό μ νμ§ μκ³ , λΉμ μ΄ μ±μ μκ°μ μΈ λ‘λ© λ¨κ³λ₯Ό λ°μ νκ² ν΅μ ν μ μλλ‘ ν΄μ€λλ€.
129
125
130
- <<<<<<< HEAD
131
- * ** It helps you avoid race conditions.** Even with ` await ` , asynchronous code is often error-prone. Suspense feels more like reading data * synchronously* β as if it were already loaded.
132
- =======
133
126
* ** κ²½μ μν(Race Condition)λ₯Ό νΌν μ μλλ‘ λμ΅λλ€.** ` await ` λ₯Ό μ¬μ©νλλΌλ λΉλκΈ° μ½λλ μ’
μ’
μ€λ₯κ° λ°μνκΈ° μ½μ΅λλ€. Suspenseλ₯Ό μ¬μ©νλ©΄ λ°μ΄ν°λ₯Ό * λκΈ°μ μΌλ‘* μ½μ΄μ€λ κ²μ²λΌ λκ»΄μ§κ² ν΄μ€λλ€. λ§μΉ μ΄λ―Έ λΆλ¬μ€κΈ°κ° μλ£λ κ²μ²λΌ λ§μ
λλ€.
134
- >>>>>>> initial draft of translation
135
127
136
128
## μ€μ μμ Suspense μ¬μ©νκΈ° {#using-suspense-in-practice}
137
129
@@ -243,11 +235,7 @@ function ProfileTimeline() {
243
235
244
236
λ§μ½ μ¬μ©μ μ 보 λΆλ¬μ€κΈ°κ° 3μ΄ μμλλ€λ©΄, 3μ΄κ° μ§λ λ€μμΌ λΉλ‘μ κ²μκΈ λΆλ¬μ€κΈ°λ₯Ό * μμ* ν μ μλ κ²μ
λλ€! μ΄κ²μ΄ λ°λ‘ "μν°ν΄"λ‘, λ³λ ¬νλ μ μμμΌλ μλνμ§ μκ² * μμ°¨μ μΌλ‘* μ€νλλ νμμ
λλ€.
245
237
246
- <<<<<<< HEAD
247
- Waterfalls are common in code that fetches data on render. They're possible to solve, but as the product grows, many people prefer to use a solution that guards against this problem.
248
- =======
249
238
μν°ν΄μ λ λλ§ μ§ν λ°μ΄ν°λ₯Ό λΆλ¬μ€λ μ½λμμ νν λ°μν©λλ€. μ΄λ₯Ό κ³ μΉλ κ²μ κ°λ₯νμ§λ§, μ±μ΄ κ±°λν΄μ§μ λ°λΌ λ§μ μ¬λλ€μ μ΄ λ¬Έμ λ₯Ό λ°©μ§ν μ μλ ν΄κ²°μ±
μ μν κ²μ
λλ€.
250
- >>>>>>> initial draft of translation
251
239
252
240
### μ κ·Ό λ°©μ 2: λΆλ¬μ€κΈ° μ΄ν λ λλ§ (Suspense λ―Έμ¬μ©) {#approach-2-fetch-then-render-not-using-suspense}
253
241
@@ -266,11 +254,7 @@ function fetchProfileData() {
266
254
}
267
255
```
268
256
269
- <<<<<<< HEAD
270
- In this example, ` <ProfilePage> ` waits for both requests but starts them in parallel:
271
- =======
272
257
μλμ μμμμλ ` <ProfilePage> ` κ° λ μμ²μ κΈ°λ€λ¦¬λλ°, λ μμ²μ λμμ μμλ©λλ€.
273
- >>>>>>> initial draft of translation
274
258
275
259
``` js{1,2,8-13}
276
260
// μ΅λν μΌμ° λΆλ¬μ€κΈ°λ₯Ό λ°λμν΅λλ€
0 commit comments