The Courier Provider
Before you can use any of the UI components, you need to initialize the Courier Provider. This establishes an authenticated connection to Courier for a specified user and provides a context object that is required for the UI components. Installation:yarn add @trycourier/react-provider
Usage:
The Toast UI component
The Toast UI component is used to display brief, optional-expiring windows of information to a user. Installation:yarn add @trycourier/react-toast
Usage:
The Inbox UI component
Inbox is a component used to display a history of read and unread messages to a user. If we send a message to a user when they are not logged in, or if they didn’t interact with the message before it disappeared, we also have an Inbox to show the history of messages received.
Installation: Installation: yarn add @trycourier/react-inbox
Usage:
React Hooks
For developers that want to build their own Inbox UIs, there is a custom React Hook that you can use to receive data about messages and interact with them programmatically. Installation:yarn add @trycourier/react-hooks
Usage: