codestates / codestates/Donorticon

[Error Handling] map 반복문 내에서의 onClick 함수 적용

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

Description

### 관련 Issue
helperlist -> helperlist/details

### 어떤 문제인가요?
아래 코드와 같이 map 반복문 내에서 onClick 함수를 설정하면 작동하지 않습니다.

### 에러 메시지
```jsx
const viewDetails = () => {
console.log('helper')
};

useEffect(() => getList(), [currentPage]);
return (
<>
{list === undefined ? (

) : (
<>

{list.map((helper) => {
return (
viewDetails}
id={helper.id}
name={helper.name}
img={helper.img}
slogan={helper.slogan}
key={helper.id}
/>
);
})}

```

### 에러 핸들링 방법

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.