Skip to content

Commit a86ee02

Browse files
authored
Merge branch 'main' into sync-49284218
2 parents 6276c89 + 234d8df commit a86ee02

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/content/reference/react/useRef.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,7 @@ return <MyInput ref={inputRef} />;
556556
557557
<ConsoleBlock level="error">
558558
559-
경고: 함수 컴포넌트에는 ref를 지정할 수 없습니다. 이 ref에 접근하려는 시도는 실패합니다. React.forwardRef()를 사용하려고 하셨나요?
560-
561-
TypeError: Cannot read properties of null {/*TODO*/}
559+
TypeError: Cannot read properties of null
562560
563561
</ConsoleBlock>
564562
@@ -577,9 +575,7 @@ export default function MyInput({ value, onChange }) {
577575
}
578576
```
579577
580-
그런 다음 아래와 같이 [`forwardRef`](/reference/react/forwardRef)로 감싸세요.
581-
582-
And then add `ref` to the list of props your component accepts and pass `ref` as a prop to the relevent child [built-in component](/reference/react-dom/components/common) like this: {/*TODO*/}
578+
그리고 `ref`를 컴포넌트가 받는 props 목록에 추가한 뒤, 아래처럼 해당 자식 [내장 컴포넌트](/reference/react-dom/components/common)에 prop으로 `ref`를 전달하세요.
583579
584580
```js {1,6}
585581
function MyInput({ value, onChange, ref }) {

0 commit comments

Comments
 (0)