onChange

·FrontEnd/React
Input 태그에 onChange 함수를 적용해보며 Throttle 과 Debounce 함수에 대해 알아보는 시간이다~!! 먼저 Styled-components 를 활용하여 나만의 Input 태그를 꾸며준다. 그 후 onChange 함수를 통해 input에 변화가 있을 때 마다 콘솔에 출력해보자. function App() { const textInputted = (e: React.ChangeEvent) => { console.log(e.target.value); }; return ; } const Input = styled.input` width: 300px; height: 50px; background-color: wheat; border-radius: 10px; font-size: 20px; `; ..
brian99
'onChange' 태그의 글 목록