Commit 9baceed
authored
docs: remove unnecessary state reset in List component (#1135)
<!--
PR을 보내주셔서 감사합니다! 여러분과 같은 기여자들이 React를 더욱 멋지게 만듭니다!
기존 이슈와 관련된 PR이라면, 아래에 이슈 번호를 추가해주세요.
-->
# 배열 State 업데이트하기 페이지 내 코드 수정
<!--
어떤 종류의 PR인지 상세 내용을 작성해주세요.
-->
안녕하세요! [배열 State
업데이트하기](https://ko.react.dev/learn/updating-arrays-in-state#adding-to-an-array)
페이지의 _배열에 항목 추가하기_ 부분에서 클릭 이벤트 내 `setName('');` 코드를 제거했습니다.
새로운 배열로 추가했을 때와 동일하게 작동해서 확인해보니, set 함수를 통해 리렌더링을 시켜주고 있었습니다. 원문과 동일하게
`setName('');` 코드 부분을 제거하였습니다!
- https://react.dev/learn/updating-arrays-in-state#adding-to-an-array
## 필수 확인 사항
- [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>1 parent 1bb9c5b commit 9baceed
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
| |||
0 commit comments