Skip to content

Commit 8ad1fc7

Browse files
wo-o29kimyouknow
andauthored
docs: Improve readability of condition prop description for dependency functions (#271)
Co-authored-by: 김윤호 yunho <kimyouknow@naver.com>
1 parent eac5efc commit 8ad1fc7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/hooks/useConditionalEffect/ko/useConditionalEffect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function useConditionalEffect(
3232
required
3333
name="condition"
3434
type="(prevDeps: T | undefined, currentDeps: T) => boolean"
35-
description="이전 및 현재 의존성을 기반으로 효과를 실행할지 결정하는 함수예요. - 초기 렌더링 시, <code>prevDeps</code>는 <code>undefined</code>일 거예요. <code>condition</code> 함수는 이 경우를 처리해야 해요. - 초기 렌더링 시 효과를 실행하려면, <code>prevDeps</code>가 <code>undefined</code>일 때 <code>true</code>를 반환하면 돼요. - 초기 렌더링 시 효과를 실행하고 싶지 않다면, <code>prevDeps</code>가 <code>undefined</code>일 때 <code>false</code>를 반환하면 돼요."
35+
description="이전 및 현재 의존성을 기반으로 효과를 실행할지 결정하는 함수예요. <br /> - 초기 렌더링 시, <code>prevDeps</code>는 <code>undefined</code>일 거예요. <code>condition</code> 함수는 이 경우를 처리해야 해요. <br /> - 초기 렌더링 시 효과를 실행하려면, <code>prevDeps</code>가 <code>undefined</code>일 때 <code>true</code>를 반환하면 돼요. <br /> - 초기 렌더링 시 효과를 실행하고 싶지 않다면, <code>prevDeps</code>가 <code>undefined</code>일 때 <code>false</code>를 반환하면 돼요."
3636
/>
3737

3838
### 반환 값

packages/core/src/hooks/useConditionalEffect/useConditionalEffect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function useConditionalEffect(
3232
required
3333
name="condition"
3434
type="(prevDeps: T | undefined, currentDeps: T) => boolean"
35-
description="Function that determines if the effect should run based on previous and current deps. - On the initial render, <code>prevDeps</code> will be <code>undefined</code>. Your <code>condition</code> function should handle this case. - If you want your effect to run on the initial render, return <code>true</code> when <code>prevDeps</code> is <code>undefined</code>. - If you don\'t want your effect to run on the initial render, return <code>false</code> when <code>prevDeps</code> is <code>undefined</code>."
35+
description="Function that determines if the effect should run based on previous and current deps. <br /> - On the initial render, <code>prevDeps</code> will be <code>undefined</code>. Your <code>condition</code> function should handle this case. <br /> - If you want your effect to run on the initial render, return <code>true</code> when <code>prevDeps</code> is <code>undefined</code>. <br /> - If you don\'t want your effect to run on the initial render, return <code>false</code> when <code>prevDeps</code> is <code>undefined</code>."
3636
/>
3737

3838
### Return Value

0 commit comments

Comments
 (0)