Liveblocks is a realtime collaboration infrastructure for building performant
collaborative experiences. Follow the following steps to start adding
notifications to your application using the hooks from
@liveblocks/react
and the components
from @liveblocks/react-ui
.
Every package should use the same version.
liveblocks.config.ts
fileWe can use this file later to define types for our application.
Liveblocks uses the concept of rooms, separate virtual spaces where
collaborate, and to create a realtime experience, multiple users must
be connected to the same room. Set up a Liveblocks client with LiveblocksProvider
.
Now that we’ve set up the provider, we can start using the Liveblocks hooks and components.
We’ll add useInboxNotifications
to get the current project’s notifications, then we’ll
use InboxNotification
and InboxNotificationList
to render them.
The default components come with default styles, you can import them into the
root of your app or directly into a CSS file with @import
.
Notifications is set up and working now, but each user is anonymous—the next step is to authenticate each user as they connect, and attach their name and avatar to their notifications.
Add your users to Notifications
Congratulations! You’ve set up the foundation to start building a notifications experience for your React application.
We use cookies to collect data to improve your experience on our site. Read our Privacy Policy to learn more.