T
TanStack3y ago
correct-apricot

UseQuery data undefined in the components

I get the data undefined at first render and so in the component I cant use it when I want to conditionally render some buttons according to the user.role, but when refetching it gets there. I also logged it and the user is populated, even in teh devtools says that
No description
2 Replies
correct-apricot
correct-apricotOP3y ago
No description
correct-apricot
correct-apricotOP3y ago
sorted, I wasnt putting the columns in the dependencies array

Did you find this page helpful?