there are two states in. a react application , client state that handles things like modal open , local state like true or flase value for some button or conditional rendering thing and sometimes for storing data from server but remember data from server is a server state and we should not store it in a cleint state unless it is not that large and frequent ,

for doing this , useEffect and creating states for loading error etc is messy ,

so we use tanstack query aka react query instead