ApolloClient1 Rendered more hooks than during the previous render // 컴포넌트 내부 const { loading: loadingAll, data: dataAll, error: errorAll } = useQuery( GET_KINDERGARTENS ); const [type, setType] = useState(""); if (loadingAll) return Loading; if (errorAll) return ERROR; if (!dataAll) return Not found; useEffect(() => { if (!type.length) return; const filteredArray = filterByType(dataAll.kindergartens, type).map( (item: any) => { return { name: item.name, locati.. 2021. 3. 28. 이전 1 다음