Avoid firing useQuery on every render
Hi! So I have a useQuery for getting a list of items and let's say this list is then put into a checklist. Now my problems is, every time I change a checkbox state, the page rerenders and it fires the useQuery again.
How would I go about limiting the useQuery here? Thank you!
Note: Not sure if makes a difference, but I'm using Tanstack Table and the checkbox is to select the row.
1 Reply
dependent-tan•2y ago
useQuery doesn't fire on every render, so there's something wrong on your end. Please show a minimal, runnable reproduction