React Native SDK pre-built components

How to use our pre-build UI components in your Knock implementation.

NotificationFeed

Overview

NotificationFeed is a React component that renders a list of notifications using data from Knock. It provides a customizable and interactive user interface for displaying notifications within your React Native application.

Properties

initialFilterStatusFilterStatusThe initial filter applied to the notification feed. Defaults to 'All'.
notificationRowStyleNotificationFeedCellStyleCustomizes the style of the notification rows in the feed.
headerConfigNotificationFeedHeaderConfigConfigures the header of the notification feed.
emptyFeedStyleEmptyNotificationFeedStyleCustomizes the appearance of the empty state when there are no notifications.
onCellActionButtonTap(params: { button: ActionButton, item: FeedItem }) => voidCallback triggered when an action button in a notification row is tapped.
onRowTap(item: FeedItem) => voidCallback triggered when a notification row is tapped.

Examples


NotificationIconButton

Overview

NotificationIconButton is a React component that renders a button with a badge showing the count of unread or unseen notifications. This can be used to open the NotificationFeed when tapped.

Properties

onClick() => voidCallback triggered when the button is pressed.
badgeCountTypeBadgeCountTypeSpecifies whether to display the count of 'unread', 'unseen', or 'all' notifications.
styleOverrideViewStyleCustomizes the overall style of the button.

Example