Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function useConditionalEffect(
required
name="condition"
type="(prevDeps: T | undefined, currentDeps: T) => boolean"
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>를 반환하면 돼요."
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>를 반환하면 돼요."
/>

### 반환 값
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useConditionalEffect/useConditionalEffect.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function useConditionalEffect(
required
name="condition"
type="(prevDeps: T | undefined, currentDeps: T) => boolean"
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>."
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>."
/>

### Return Value
Expand Down
Loading