๋ชฉ๋กtodolist (1)
๐ค ์์งlog ๐ค
[REACT] To-do List ๋ง๋ค๊ธฐ
๐ก ํผ์์ ๋ง๋ค์ ์๋ค๋ฉด ์ฌ๋ฌ๋ฒ ์ฐ์ตํด๋ณด๊ธฐ ๐ก import { useState, useRef } from 'react' import styled, { css } from 'styled-components' const Todo = () => { const [text, setText] = useState('') const [todoList, setTodoList] = useState([]) const nextId = useRef(1) const handleChange = (e) => { setText(e.target.value) } const handleSubmit = (e) => { e.preventDefault() // form ์์ submit ์ญํ ์ ํ๋ ๋ฒํผ์ ๋๋ ์ด๋ ์๋ก๊ณ ์นจ ๋์ง ์๊ฒ ํ๊ณ ์ถ์ ..
๐ React
2022. 10. 6. 14:31