일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ES5+
- 우아한테코톡
- DOM
- AI
- 변수
- ES6+
- es6
- hatso
- developerlife
- Python
- github
- learn next.js
- JavaScript
- html5
- gitCLI
- git
- API
- This
- 최적화
- array
- hooks
- 함수
- JS
- react
- 햇소
- 선택자
- next.js
- dev
- object
- CSS
- Today
- Total
목록API (4)
codinghatso

React 공식문서 링크 Hooks API Reference – React A JavaScript library for building user interfaces ko.legacy.reactjs.org useMemo는 메모리 최적화를 위한 Hook API입니다. const memoizedValue = useMemo(() => computeExpensiveValue(a, b), [a,b]); useMemo()에 콜백함수를 사용하며 retrun 값을 넘겨준다. return 값에는 객체도 넘겨줄 수 있다. useMemo()의 두 번째 인자로는 의존성 배열을 표기한다. (의존성 배열의 값이 바뀔 때만 콜백을 호출한다.) useMemo는 성능 최적화를 위해 사용할 수 있지만 의미상으로 보장이 있고 생각하지는 말..

브라우저에서 좌표찾기 getBoundingClientRect() 사용법 Element.getBoundingClientRect(); 예시 const sbox = document.querySelector(".sbox"); document.addEventListener("click", (e) => { const rect = sbox.getBoundingClientRect(); console.log(rect); console.log(`clinet: ${e.clientX}, ${e.clientY}`); console.log(`page: ${e.pageX}, ${e.pageY}`); });

indexOf() 검색 /** * Returns the index of the first occurrence of a value in an array, or -1 if it is not present. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ indexOf(searchElement: T, fromIndex?: number): number; indexOf: * 배열에서 값이 처음 나타나는 인덱스를 반환하거나 값이 없으면 -1을 반..

*API 관련 업로드는 lib.es5.d.ts 파일의 내용을 바탕으로 공부했습니다. *파일에는 IDE(VScode)기능으로 mac은 command키 window는 control키를 누르고 원하는 함수를 클릭하면 파일이 열립니다. toString(), toLcaleString() 문자열 /** * Returns a string representation of an array. */ toString(): string; /** * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. */ toLocaleString(): string; toString():..