Is useEffect the best way to handle changes in data? - TanStack