From 3649ca17fd89e2b665c49151d0b88cbf8017e1f9 Mon Sep 17 00:00:00 2001 From: donguk seo Date: Sun, 28 Apr 2019 22:41:22 +0900 Subject: [PATCH 1/6] Draft translation --- content/docs/faq-functions.md | 121 +++++++++++++++++----------------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/content/docs/faq-functions.md b/content/docs/faq-functions.md index 75143c43f..5cce3a8f8 100644 --- a/content/docs/faq-functions.md +++ b/content/docs/faq-functions.md @@ -6,21 +6,21 @@ 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