You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportfunctionusePendingInvites(){constqueryClient=useQueryClient()constclientApi=useClientApi()const{ data, isFetching }=useQuery(pendingInvitesQueryOptions({ clientApi }),)useEffect(()=>{functiononInviteEvent(){queryClient.invalidateQueries({queryKey: getInvitesQueryKey()})}clientApi.invite.addListener('invite-received',onInviteEvent)clientApi.invite.addListener('invite-removed',onInviteEvent)return()=>{clientApi.invite.removeListener('invite-received',onInviteEvent)clientApi.invite.removeListener('invite-removed',onInviteEvent)}},[queryClient,clientApi.invite])// Not sure what this return value should be...return{data: dedupeInvites(data||[]), isFetching }}
Questions:
We had doubts about whether we wanted this hook to be suspense-based. Given that, not entirely sure what we want the return value to look like. Are we okay with this being one of those weird exceptions to the rest of the read hooks?
We had mentioned needing to dedupe the invites payload. Not exactly sure why or what that looks like right now.
Should we extract the effect to its own hook and expose that separately?
The text was updated successfully, but these errors were encountered:
Rough sketch of what we initially thought about:
Questions:
We had doubts about whether we wanted this hook to be suspense-based. Given that, not entirely sure what we want the return value to look like. Are we okay with this being one of those weird exceptions to the rest of the read hooks?
We had mentioned needing to dedupe the invites payload. Not exactly sure why or what that looks like right now.
Should we extract the effect to its own hook and expose that separately?
The text was updated successfully, but these errors were encountered: