데이터 모델링 개편으로 비효율적인 데이터 요청 줄이기
비효율적인 초기 데이터 모델링으로 인해 발생한 filter,map 남발 현상 발견 //* post CollectionCategory 기준 데이터 가져오기 const getTownDatas = async ({ queryKey }: { queryKey: string[] }) => { const [_, town] = queryKey; const response: { id: string }[] = []; let q = query( collection(dbService, 'post'), where('town', '==', town), orderBy('createdAt', 'desc') ); const querySnapshot = await getDocs(q); @@ -29,19 +27,12 @@ const Col..
더보기