Skip to main content

useFetchSentPendingConnections

Overview

The useFetchSentPendingConnections hook fetches the list of connection requests that the current logged-in user has sent to other users but are still pending (awaiting response). This is useful for managing outgoing connection requests and tracking networking activity.

Usage Example

Advanced Usage with State Management

Usage with Bulk Operations

Usage with Search and Filter

Parameters & Returns

Parameters

The hook returns a function that accepts an optional object with the following fields:
page
number
1
limit
number
20

Returns

The function returns a Promise that resolves to a PendingConnectionListResponse object containing:

PendingConnectionListResponse

connections
PendingConnection[]
Array of pending connection information
pagination
PaginationInfo
Pagination metadata

PendingConnection

PaginationInfo

Error Handling

The hook will throw errors in the following cases:
  • No project is specified
  • No user is logged in
  • Network connection issues

Use Cases

This hook is commonly used for: Request Management:
  • Displaying outgoing connection requests
  • Allowing users to withdraw pending requests
  • Tracking networking activity
User Experience:
  • Preventing duplicate requests to the same user
  • Showing request status in user profiles
  • Managing networking workflow
Analytics & Insights:
  • Understanding user networking behavior
  • Measuring connection request success rates
  • Identifying popular users in the network

Best Practices

  1. Real-time Updates: Refresh the list after actions like withdrawing requests
  2. Pagination: Use pagination for large lists to improve performance
  3. Search & Filter: Implement search functionality for better user experience
  4. Bulk Actions: Allow bulk withdrawal for power users
  5. Status Indicators: Show clear status for each request
  • useFetchReceivedPendingConnections - Get incoming connection requests
  • useRemoveConnection - Withdraw sent connection requests
  • useRequestConnection - Send new connection requests
  • useFetchConnectionStatus - Check status with specific users