Handling interactivity
How to handle routing, clicking, and other interactions with your in-app feed.
Knock enables you to build engaging in-app feed experiences with a rich set of interactivity features across all supported platforms (Web, iOS, Android, and React Native). This guide covers the various ways you can handle user interactions with your feed components.
Common interaction patterns#
Clicking and tapping#
All Knock feed components support handling user interactions through click/tap events:
Web (React)#
iOS#
Android#
React Native#
URL handling#
Knock supports automatic URL handling for notifications:
-
Action URLs. You can specify an
action_url
in your notification template, and Knock will automatically handle redirects when users interact with the notification. -
Custom URL handling. You can implement custom URL handling logic in your click handlers to control navigation behavior.
State management#
Knock provides built-in state management for notification interactions:
-
Mark as read. Notifications can be automatically marked as read when:
- The feed is opened
- A notification is clicked
- A button within a notification is clicked
-
Mark as seen. Notifications are automatically marked as seen when they appear in the feed viewport.
-
Archiving. Users can archive notifications through swipe actions or dedicated buttons.
Learn more#
For more detailed information about implementing interactivity in your specific platform, refer to the platform-specific docs: