Can't list organizations on Vue client

Hey! I've noticed that I can't really get the organizations on the client side. Well... Sometimes it works, but TypeScript is not happy about it. Seems like perhaps the types are outdated? Attaching image from LSP. The docs suggest using the options API in Vue instead of composition API, which I haven't tried, but I'm guessing the result might be the same.
If I try to call the "useListOrganizations" I get "This expression is not callable". It doesn't throw when I do that though, more of a static type check error. When inspecting the object, printing it etc, it does look like a reactive object. And sometimes I can get the org out of there, but most of the time it's just undefined and I can't really figure out what's going on there. Maybe it's a user error as well but I think the docs and the types can be clearer here. Thanks!
No description
1 Reply
Laktos
LaktosOP4mo ago
So, doing this, I can get this to print: And this is what I'm on about, that sometimes I can get that to print, but then I refetch the session or something, and then sometimes it's all just undefined. Oh right, it's probably got something to do with the reactive nature of it
No description
No description

Did you find this page helpful?