codestates / codestates/BanThing

[Error Handling] 오브젝트는 React child로 사용할 수 없다는 에러

Open
#83 0 comments 0 reactions 1 assignee Claimed by @tmdqls2257 View on GitHub
client error solved
Dominant language
TypeScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### 어떤 에러인가요?
- 오브젝트는 React child로 사용할 수 없다는 에러입니다.
```
$ Error: Objects are not valid as a React child (found: object with keys {children}). If you meant to render a collection of children, use an array instead.
```

### 에러 핸들링 방법
![image](https://user-images.githubusercontent.com/54207332/154493438-f4b8e90c-3faf-4787-be6d-e5854da161b2.png)
- props로 받아온 children의 오브젝트의 형태로 전달됩니다. 우리는 이 안에 있는 값을 사용해야하기 때문에 오브젝트로 감싸줍니다.
![image](https://user-images.githubusercontent.com/54207332/154493931-8870afa2-258e-4247-8dc7-0dac6936b093.png)

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.