inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

top1052님의 게시글

top1052 top1052

@top10525210

수강평 작성수
8
평균평점
5.0

게시글 3

질문&답변

그대로 넣으면 map을 찾지 못한다는 오류가 나옵니다

저도 map이 undefined라고 나와서 한참 찾았는데, 다른 곳 오타였어요;; notifications:[], //빈 배열 여기에 s 빼놓음;; import React from "react"; import Notification from "./Notification"; const reservedNotifications = [ { message:"안녕, 오늘 일정은", }, { message:"곧 점심식사 시간이야", }, { message:"미팅이 시작된다", }, ] var timer; class NotificationList extends React.Component { constructor(props){ super(props); this.state = { notifications:[], //빈 배열 } } componentDidMount(){ const {notifications} = this.state; timer = setInterval(() => { if(notifications.length {this.state.notifications.map((notification) => { return })} ) } } export default NotificationList;

좋아요수
1
댓글수
2
조회수
477

질문&답변

코드 오류

self 부분이 빠진거 같아요FlyableAttackUnit.__init__(self, "레이스", 80, 20, 5) FlyableAttackUnit.__init__(self, "레이스", 80, 20, 5)

좋아요수
0
댓글수
2
조회수
379