Skip to content

Commit 234d8df

Browse files
docs: remove ref guide about react18 (#1140)
<!-- PR을 보내주셔서 감사합니다! 여러분과 같은 기여자들이 React를 더욱 멋지게 만듭니다! 기존 이슈와 관련된 PR이라면, 아래에 이슈 번호를 추가해주세요. --> # useRef에서 forwardRef에 대한 설명을 지우고 콘솔 에러메시지를 최신 React19 문서에 맞게 반영 <!-- 어떤 종류의 PR인지 상세 내용을 작성해주세요. --> - forwardRef에 대한 설명은 React19이후엔 필요없어지고 영문 문서에도 해당 내용이 빠져 뺐습니다. - 단순 ref를 props로 넘겨준다는 미번역된 문구 번역했습니다. - 콘솔 에러메시지가 나타나지 않았고 영문 문서와 동일한 콘솔 에러메시지를 표시하도록했습니다. (기존엔 에러메시지가 보이지 않았네요.) ## 필수 확인 사항 - [x] [기여자 행동 강령 규약<sup>Code of Conduct</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인<sup>Contributing</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드<sup>Universal Style Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례<sup>Best Practices for Translation</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리<sup>Translate Glossary</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드<sup>Textlint Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사<sup>Spelling Check</sup>](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성<sup>Draft Translation</sup> - [ ] 리뷰 반영<sup>Resolve Reviews</sup> --- Co-authored-by: 루밀LuMir <[email protected]>
1 parent f42b853 commit 234d8df

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)