In-App UI
React
UI components
Inbox
Inbox
How to build a notification inbox powered by Knock and React.
Our @knocklabs/react library can be used to build full-page inbox experiences, too. This page covers how to create a basic inbox for your users in just a few minutes.
Getting started
#To use this example, you'll need an account on Knock, as well as an in-app feed channel with a workflow that produces in-app feed messages. You'll also need:
- A public API key for the Knock environment (set as
KNOCK_PUBLIC_API_KEY) - The channel ID for the in-app feed (set as
KNOCK_FEED_CHANNEL_ID)
Installing dependencies
#Rendering the notification inbox
#Here we're using the KnockProvider to authenticate our current user and get access to the Knock JavaScript client. Then we use the KnockFeedProvider to connect them to a Knock In-app Feed Channel. We then render the NotificationFeed component to give us a simple, complete notification inbox page.