The useNotifications hook provides a way to fetch and manage notifications in your React Native application. It includes support for pagination, and filtering.
Hook Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| storeId | string | No | Filter notifications by a specific store ID |
| query | object | No | Additional query parameters for filtering |
Return Value#
Example Usage#
Here’s how to use the useNotifications hook to fetch and display notifications:
With Pull to Refresh#
You can implement pull-to-refresh using the refetch function:
With Filters#
You can apply filters using the query parameter: