【文件属性】:
文件名称:ts-react-todoList:用react + ts完成简单的todoList
文件大小:26KB
文件格式:ZIP
更新时间:2021-02-15 15:32:31
TypeScript
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 < HTMLInputElement> ( null ) ;
const [ todoList , setTodoList ] = useState < TodoList> ( [ ] ) ;
const deleteTodoItem = ( id : s
【文件预览】:
ts-react-todoList-main
----index.html(297B)
----vite.config.js(188B)
----src()
--------index.css(366B)
--------main.tsx(214B)
--------App.css(334B)
--------App.tsx(2KB)
----README.md(2KB)
----.gitignore(13B)
----package-lock.json(118KB)
----package.json(427B)