Uncaught runtime Error!

HMJ·2024년 12월 20일
Objects are not valid as a React child (found: object with keys {props}). If you meant to render a collection of children, use an array instead.
    at throwOnInvalidObjectType (http://localhost:3000/static/js/bundle.js:13130:11)
    at reconcileChildFibersImpl (http://localhost:3000/static/js/bundle.js:13445:9)
    at http://localhost:3000/static/js/bundle.js:13457:31
    at reconcileChildren (http://localhost:3000/static/js/bundle.js:14830:47)
    at beginWork (http://localhost:3000/static/js/bundle.js:15601:1565)
    at runWithFiberInDEV (http://localhost:3000/static/js/bundle.js:10894:14)
    at performUnitOfWork (http://localhost:3000/static/js/bundle.js:18138:93)
    at workLoopSync (http://localhost:3000/static/js/bundle.js:18032:38)
    at renderRootSync (http://localhost:3000/static/js/bundle.js:18016:7)
    at performWorkOnRoot (http://localhost:3000/static/js/bundle.js:17777:42)

props를 자식 컴포넌트에 넘겨주었을 때, { props } 형태로 자식 컴포넌트에서 사용해야 한다. 이것을 사용하지 않아 에러가 떴다...

참고 자료
BLOG : https://velog.io/@leemember/Objects-are-not-valid-as-a-React-child-%EC%97%90%EB%9F%AC-%ED%95%B4%EA%B2%B0%ED%95%98%EA%B8%B0
tiypeScript : https://ko.react.dev/learn/typescript

0개의 댓글