A modern JavaScript utility library delivering modularity, performance & extras
Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc.
Lodash’s modular methods are great for:
옦께이 라이브러리고
array, numbers, objects, strings 다룰 때 쉽게 해준다
array/objects/strings 반복할때 좋다
https://lodash.com/docs/4.17.15#debounce
난 lodash가 만들어놓은 _.debounce
function을 사용할 예정
_.debounce(콜백함수, [wait=0], [options={}])
그럼 또 알아봐야지...
디바운스와 쓰로틀링 세트세트인데 뭐가 다를까
옛날 게시물이긴하지만 로다쉬가 이거 보라니까 일단 보자
https://css-tricks.com/debouncing-throttling-explained-examples/
공통점 : 시간에 따라 함수 실행 횟수를 제어한다
디바운스 : 시작! 부터 땡! 까지 실행된 횟수 중 대표 하나만 너 나와 하는거
쓰로틀링 : 브레이크타임 줘서 손님 못오는거