上传者: 42160252
|
上传时间: 2022-03-15 14:18:17
|
文件大小: 26KB
|
文件类型: -
ts-react-todoList
用react + ts完成简单的todoList
import React , { useEffect , useRef , useState } from "react" ;
import "./App.css" ;
import produce from "immer" ;
interface TodoList {
id: string ;
content: string ;
}
function App ( ) {
const inputRef = useRef ( null ) ;
const [ todoList , setTodoList ] = useState ( [ ] ) ;
const deleteTodoItem = ( id : s