let result = a.renderings.map(function(item) {
return item._id;
});
{result.map((_id:string, index:number) => {
return (
<div key={index}>
<Card src={_id} shape="1" onClick={a} />
</div>
);
})
}
타입스크립트 타입지정
인터페이스
디폴트밸류
리스트
구현해야할 기능
모달
닫기버튼
동적배열
반응형이미지
다운로드와 삭제기능
이미지선택기능
상세페이지의 슬라이드기능?
할수있어!
import { useSelector } from "react-redux";
import Item from "./Item";
import { RootState } from "../redux/configureStore";
function List() {
const toDoList: ToDoList = useSelector((state: RootState) => state.toDoList.toDoList);
console.log(toDoList)
return (
<div>
{toDoList && toDoList.map((toDo, index) => <div key={index}><Item toDo={toDo} /></div>)}
</div>
);
}
export default List;