일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- springboot
- DataGridView
- Spring
- 자바
- MySQL
- AWS
- 리팩토링
- Python
- 스프링부트
- Winform
- VOA
- 마이바티스
- 머신러닝
- 도커
- machine-learning
- 스프링
- Java
- kubernetes
- git
- 리액트
- 리눅스
- react
- 영어공부
- docker
- c#
- 쿠버네티스
- mybatis
- Spring Boot
- 파이썬
- github
Archives
- Today
- Total
목록useRef (1)
보뇨 다이어리
focus input on page loading
한창 typescript 와 react 로 맛을 보던중... 페이지 로딩할때 input 태그에 바로 focus 를 어떻게 해야하는지 찾아보았다 사실 간단한데 typescript 로 짤려니까 에러가 보기싫더라구...ㅠ const Search = () => { const [input, setInput] = useState(""); const history = useHistory(); const inputRef = useRef(); const search = (e: React.MouseEvent) => { e.preventDefault(); history.push("/search"); }; useEffect(() => { // error inputRef.current.focus(); }, []); return..
프론트엔드/React 정보
2020. 9. 2. 19:38