Skip to content

Commit ffbeed9

Browse files
wo-o29lumirlumir
andauthored
docs: update lastName state updater to use toUpperCase() instead of reverse() (#1293)
<!-- PR을 보내주셔서 감사합니다! 여러분과 같은 기여자들이 React를 더욱 멋지게 만듭니다! 기존 이슈와 관련된 PR이라면, 아래에 이슈 번호를 추가해주세요. --> ### lastName에 사용되는 메서드 사용 변경 일반적으로 `lastName`은 문자열로 사용되는데 배열 메서드인 `reverse()`을 사용하여 혼란을 줄 수 있을 것 같다고 생각합니다. 위와 같은 이유로 문자열 메서드인 `toUpperCase()`를 사용하는 것으로 변경하였습니다. ## 필수 확인 사항 - [x] [기여자 행동 강령 규약](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성<sup>Draft Translation</sup> - [ ] 리뷰 반영<sup>Resolve Reviews</sup> Co-authored-by: 루밀LuMir <[email protected]>
1 parent 5a27ae7 commit ffbeed9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/queueing-a-series-of-state-updates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ h1 { display: inline-block; margin: 10px; width: 30px; text-align: center; }
255255

256256
```js
257257
setEnabled(e => !e);
258-
setLastName(ln => ln.reverse());
258+
setLastName(ln => ln.toUpperCase());
259259
setFriendCount(fc => fc * 2);
260260
```
261261

0 commit comments

Comments
 (0)