[REACT] useMemo로 랜더링 최적화 하기
useMemo로 랜더링 최적화 하기메모이제이션 기법을 기반으로 불 필요한 연산을 최적화 하는 리액트 훅 useMemo(() => {}, [])두번재 인자인 [] 안에 들어간 값이 변경될때마다 첫번째 인자인 ()=>{}콜백함수가 실행된다.const getAnalyzedData = () => { const totalCount = todos.length; const doneCount = todos.filter((todo) => todo.isDone).length; const notDoneCount = totalCount-doneCount; return { totalCount, doneCount, notDoneCount }};const {totalCount, doneCount, not..