6. React와 함께 TypeScript 사용하기(5), [ State ]
1. State 다루기 const items = [ { name: "ms", age: 3, address: "csd-x5", phone: 323 }, { name: "cs", age: 5, address: "csd-x7", phone: 2323 }, ]; function App() { const [todo, setTodo] = useState([]); 2. 타입 별칭을 이용해, 아웃소싱하자 import { Todo } from "./models/todos"; const items = [ { name: "ms", age: 3, address: "csd-x5", phone: 323 }, { name: "cs", age: 5, address: "csd-x7", phone..
2022. 12. 26.