2024-05-14 스탠다드 미니 과제
import { useState } from "react";import "./App.css";function App() { const initialState = [ { id: 1, name: "John", age: 20 }, { id: 2, name: "Doe", age: 21 }, ]; const [users, setUsers] = useState(initialState); // TODO: 이름과 나이를 각각 상태로 정의하세요. 초기값은 빈문자열("")입니다. const [name, setName] = useState(''); const [age, setAge] = useState(''); // 빈 문자열을 초기값으로 state 값 초기화 // 각각 name, age라는 변수명..
Programing/TIL
2024. 5. 14.