components (1) 썸네일형 리스트형 반복되는 Component 처리하기 반복되는 Component 처리하기 컴포넌트 중복 map함수로 빼기 map 함수란? 원래 데이터를 가공하여 출력하는 방법 import logo from './logo.svg'; import './App.css'; function App() { const testArr = ['감자', '고구마', '오이', '가지', '옥수수']; return ( { testArr.map(function(item) { return {item} }) } ); } export default App; filer 함수 testArr = [1, 2, 3] testArr.filter((item) => { return item > 3 }) // [1, 2] App.js import React from 'react'; import '... 이전 1 다음