Blog/React.js
[일기장 만들기_03] 배열 사용하기 1 - 리스트 렌더링(조회)
목표 - 배열을 이용하여 LIST 조회 - 개별 컴포넌트 생성 1. 리스트를 렌더링할 DiaryList.js 생성 2. App.js에 테스트용 더미데이터 생성 import './App.css'; import DiaryEditor from './DiaryEditor'; import DiaryList from './DiaryList'; // 더미 데이터 생성 const dummyList = [ { id: 1, // 💡 모든 데이터는 고유한 아이디를 가지고 있는다. author: "더미1", content: "내용11111", emotion: 2, create_date: new Date().getTime() }, { id: 2, author: "더미2", content: "내용222221", emotion: ..
2022. 2. 16.