React_Form submission
// src/index.js import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; const books = [ { author: 'Charles Dickens', title: 'Interesting Topics', img: './images/book-1.jpg', id: 1, }, { author: 'Laura Dave', title: 'The Last Thing He Told Me', img: './images/book-2.jpg', id: 2, }, ]; const BookList = () => { return ( {books.map((book) => { return ; })} ); }; con..
2023. 4. 24.
React_props 깔끔하게 가져오기
객체 분해 할당으로 props 가져오기 // src/index.js import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; const books = [ { author: 'Charles Dickens', title: 'Interesting Topics', img: './images/book-1.jpg', id: 1, }, { author: 'Laura Dave', title: 'The Last Thing He Told Me', img: './images/book-2.jpg', id: 2, }, ]; const BookList = () => { return ( {books.map((book) => { ..
2023. 4. 24.