DEV Community

Discussion on: How to fetch subcollections from Cloud Firestore with React

Collapse
 
gkranasinghe profile image
gkranasinghe

Associating a hook with query will cause infinite rerendering of the component ,as useState will rerender the component ,which will lead to reexecute the Query .I think this is really a bad practice

Collapse
 
lucianoschillagi profile image
Luko

Hello,
and what is your solution for this case?
Thanks!