diff --git a/content/docs/faq-functions.md b/content/docs/faq-functions.md index f03b2ba76..f07f52d42 100644 --- a/content/docs/faq-functions.md +++ b/content/docs/faq-functions.md @@ -1,26 +1,26 @@ --- id: faq-functions -title: Passing Functions to Components +title: 컴포넌트에 함수 전달하기 permalink: docs/faq-functions.html layout: docs category: FAQ --- -### How do I pass an event handler (like onClick) to a component? {#how-do-i-pass-an-event-handler-like-onclick-to-a-component} +### 컴포넌트로 onClick과 같은 이벤트 핸들러를 어떻게 전달 할까요? {#how-do-i-pass-an-event-handler-like-onclick-to-a-component} -Pass event handlers and other functions as props to child components: +자식 컴포넌트에 프로퍼티로 이벤트 핸들러와 다른 함수들을 전달합니다. ```jsx } ``` -Instead, *pass the function itself* (without parens): +위와 같은 방식이 아니라 괄호 없이 _함수 그 자체를 전달해야 합니다._ ```jsx render() { - // Correct: handleClick is passed as a reference! + // 올바른 방법 : handleClick이 레퍼런스로 전달되었습니다. return } ``` -### How do I pass a parameter to an event handler or callback? {#how-do-i-pass-a-parameter-to-an-event-handler-or-callback} +### 이벤트 핸들러나 콜백에 어떻게 매개변수를 전달할나요? {#how-do-i-pass-a-parameter-to-an-event-handler-or-callback} -You can use an arrow function to wrap around an event handler and pass parameters: +이벤트 핸들러에 화살표 함수를 사용하여 감싼 다음에 매개변수를 넘겨줄 수 있습니다. ```jsx