Skip to content

Commit 8006c5a

Browse files
committed
fix : comment 반영
1 parent d72fdd5 commit 8006c5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/reference/react/useCallback.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: useCallback
44

55
<Intro>
66

7-
`useCallback`은 리렌더링 사이에 함수 정의를 캐시할 수 있게 해주는 React Hook입니다.
7+
`useCallback`은 리렌더링 사이에 함수 정의를 캐시할 수 있게 해주는 React 훅입니다.
88

99
```js
1010
const cachedFn = useCallback(fn, dependencies)
@@ -16,11 +16,11 @@ const cachedFn = useCallback(fn, dependencies)
1616

1717
---
1818

19-
## 문서 {/*reference*/}
19+
## 레퍼런스 {/*reference*/}
2020

2121
### `useCallback(fn, dependencies)` {/*usecallback*/}
2222

23-
컴포넌트의 최상위 레벨에서 useCallback을 호출하여 리렌더링 간 함수 선언 캐시하세요.
23+
컴포넌트의 최상위 레벨에서 useCallback을 호출하여 리렌더링 간 함수 선언하세요.
2424

2525
```js {4,9}
2626
import { useCallback } from 'react';
@@ -38,7 +38,7 @@ export default function ProductPage({ productId, referrer, theme }) {
3838
3939
#### 인자 {/*parameters*/}
4040
41-
* `fn`: 캐시하려는 함수입니다. 어떠한 인자를 취하고 어떠한 값을 반환할 수 있습니다. React는 초기 렌더링 중에 함수를 반환(호출하지 않음)합니다. 다음 렌더링할 때, `dependencies`가 마지막 렌더링 이후 변경되지 않은 경우 React는 동일한 함수를 다시 반환합니다. 변경되었다면, React는 현재 렌더링 중에 전달한 함수를 반환하고 나중에 재사용할 수 있는지 확인하기 위해 저장합니다. React는 함수를 호출하지 않습니다. 함수는 호출할 시기와 여부를 결정할 수 있도록 반환됩니다.
41+
* `fn`: 캐시하려는 함수입니다. 이 함수는 아무 인자나 받을 수 있고, 아무 값이나 반환할 수 있습니다. React는 초기 렌더링 중에 함수를 반환(호출하지 않음)합니다. 이후 렌더링할 때 `dependencies`가 마지막 렌더링 이후 변경되지 않은 경우 React는 동일한 함수를 다시 반환합니다. 변경되었다면, React는 현재 렌더링 중에 전달한 함수를 반환하고 나중에 재사용할 수 있는지 확인하기 위해 저장합니다. React는 함수를 호출하지 않습니다. 함수는 호출 시점과 여부를 직접 결정할 수 있도록 반환됩니다.
4242
4343
* `dependencies`: The list of all reactive values referenced inside of the `fn` code. Reactive values include props, state, and all the variables and functions declared directly inside your component body. If your linter is [configured for React](/learn/editor-setup#linting), it will verify that every reactive value is correctly specified as a dependency. The list of dependencies must have a constant number of items and be written inline like `[dep1, dep2, dep3]`. React will compare each dependency with its previous value using the [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) comparison algorithm.
4444

0 commit comments

Comments
 (0)