codestates / codestates/Lollin-client

[Error Handling] APP.js => React Router로 렌더링하는 컴포넌트에 prop 전달 에러

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

---

**어떤 에러인가요?**
React Router로
와같이 state나 function을 props로 전달시
해당 컴포넌트에서 props 를 console.log(props)가 undefined로 노출되는 문제.

**에러 핸들링 방법**
```
} />
와같이 render메서드로 inline function 형식으로 해결.

const handleChampPriId = (id) => {
setChampPriId(id);
};

}
/>
```

**에러 핸들링을 위해 참고한 레퍼런스 링크**
[`링크`](https://sustainable-dev.tistory.com/117)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in APP.js and inspect the React Router entry for ChampDetail, especially the contrast between component={ChampDetail} and the render example. Verify whether values such as champPriId reach ChampDetail without being undefined. The issue names no test file or further acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.