codestates / codestates/Donorticon
[Error Handling] 코드 변경 질문
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### 관련 Issue
Gifticon.js
### 어떤 문제인가요?
문제는 아니지만, 제 코드를 수정하신 부분에 의문이 들어서 이슈를 남깁니다.
Gifticon.js 파일에서 원래 코드는 아래와 같이 user 정보를 불러왔습니다.
``` javascript
const who = useSelector((state) => state.user.user.who);
```
그래서 who 변수를 사용할때 아래와 같이 사용하였는데요
``` javascript
현재까지 {count}회 기부를 {who === 2 ? '받으셨네요!' : '하셨네요!'}
```
위의 2부분을 아래와 같이 수정하셨더라구요!
```javascript
const who = useSelector((state) => state.user.user);
현재까지 {count}회 기부를 {who.who === 2 ? '받으셨네요!' : '하셨네요!'}
```
굳이 변수를 who.who 이렇게 사용을 해야하는지 의문이 들어서요.......
특별히 수정을 하신 이유가 있으실까요?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading Gifticon.js and comparing the two useSelector expressions shown in the issue, then inspect the related issue or change that introduced the second form. Done means the reason for the change is established and recorded in a clear response or project documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100