![](http://i1.daumcdn.net/thumb/C148x148.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/rkKIb/btq3ITxMcW5/s9qGyK7xKxd9oNWJ9kmIJK/img.png)
react에서 List 무한스크롤을 처리하는데, reacvt-virtualized를 사용하면 리스트에 사용되는 컴포넌트의 렌더링 관리가 가능하다. 기능 설명은 아래에. https://ellen92.tistory.com/56 [React] 컴포넌트 성능 최적화 2500개의 리스트를 출력한다고 가정할 때 기본적인 코드는 아래와 같이 작성하게 된다. import { useState } from "react"; function setArray() { const array = []; for (let i = 1; i { console.log(clientHeight); console.log(clientWidth); return( )}} ) 특정 이벤트에 스크롤을 적용하려면, 스크롤이 움직이는 동안 scrollHeig..
Ref란? - render 메서드에서 생성된 DOM 노드나 React 엘리먼트에 접근하는 방법을 제공. - id와 같은 역할을 하지만, ref에서는 컴포넌트 내부에서만 작동하기 때문에 id중복 문제를 해결할 수 있음. //jquery $("#input").val("abc"); $("#input").focus(); const getValue = $("#input").val(); //react const inputRef = useRef(); inputRef.current.value = "abc"; inputRef.current.focus(); const getValue = inputRef.current.value; ref를 사용해야 하는 경우. - 특정 input에 포커스 주기 - 스크롤박스 조작하기 - c..
- Total
- Today
- Yesterday
- typescript
- paging
- 클래스형
- module
- script
- hooks
- ajax
- JSON
- hashmap
- datePicker
- date
- input
- JSP
- 함수형
- list
- 스프링
- html
- Spring
- Progressbar
- angular
- java
- nodeJS
- JSX
- 리액트
- webpack
- javascript
- value
- Redux
- Props
- React
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |