Chunho’s DevLife

  • 홈
  • 태그
  • 방명록

IntrinsicAttributes 1

[React] typescript IntrinsicAttributes error

{aboutContents.map((content, index) => ( ))} js를 사용할때와 마찬가지로 위와 같이 map을 사용해서 props로 객체를 전달하는 도중 IntrinsicAttributes error 가 발생하였다. props를 전달받는 하위 컴포넌트는 function AboutPart(item: AboutContentType) { const {id, title, content} = item​ 위와 같은 방식으로 item의 타입을 지정해줬다. 객체 자체를 props로 전달받을 때는 function AboutPart({item}: {item: AboutContentType}) { const {id, title, content} = item 위와 같이 타입을 지정하여 해결할 수 있었다.

React.js 2022.05.09
이전
1
다음
더보기

방문자수Total

  • Today :
  • Yesterday :
프로필사진

Chunho’s DevLife

웹 프론트엔드, 모바일 게임 클라이언트를 개발하고 있습니다 :) 클린코드와 아키텍처에 관심이 많습니다.

  • 분류 전체보기 (111)
    • Node.js (6)
    • React.js (60)
    • React-Native (3)
    • Java (7)
    • 자료구조 (0)
    • 알고리즘 (0)
    • 코딩테스트 (1)
    • AWS (4)
    • Javascript (0)
    • ETC (9)
    • 컴퓨터 네트워크 (4)
    • 데이터 과학 (4)
    • Next.js (13)
    • 웹 해킹 (0)

Tag

reactnative, rn, Modal, API, javascript, react-native, nextjs, SSR, ReactJS, react, typescript, CSS, useQuery, Next, ERR, framer-motion, getStaticProps, react-query, login, Safari,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Copyright © Kakao Corp. All rights reserved.

  • GitHub
  • Instagram

티스토리툴바