댓글에 대한 정보들을
useEffect(() => {
let getComment = axios.get(`http://localhost:8080/api/comment/${id}`,{
withCredentials: true
}).then((result)=>{
setComment([...result.data])
}).catch((error)=>{
console.log(error)
})
}, [comment]);
이렇게 받아오고있는데
comment가 변할 때만 get 요청을 해야하는데 서버를 보면 계속
Hibernate: select c1_0.comment_id,c1_0.content,c1_0.parent_id,c1_0.username from comment c1_0 where c1_0.parent_id=?
이 쿼리가 실행되고있습니다 혹시 어떤 부분이 문제일까요...?