We've released pagination for Comments & Notifications, a way to revalidate user & room data, added further support for attachments, and are now offering new discounts for startups.
We’ve added pagination when fetching threads and inbox notifications in React,
making it easy to add a “Load more” button when building your application. This
is the new default behavior, and can make initial load times quicker, as only 50
threads/notifications are loaded at once.
In our React components, it’s now possible to revalidate user, mention, and room
data without refreshing this page. This is helpful in a number of ways—for
example if a user changes their avatar, you can tell Liveblocks to revalidate
its user cache, and you’ll see the new avatar in Comments.
functionSubmitAvatar(){const client =useClient(); functionhandleClick(){__updateUserAvatar__(); // Refresh user cache and get new avatar client.resolvers.invalidateUsers();} return<buttononClick={handleClick}>Submit avatar</button>;}
We’ve introduced three new functions for this, allowing you to:
// Refreshing user infoclient.resolvers.invalidateUsers();// All usersclient.resolvers.invalidateUsers(["user-0","user-1"]); // Refreshing room infoclient.resolvers.invalidateRoomsInfo();// All roomsclient.resolvers.invalidateRoomsInfo(["room-0","room-1"]); // Refreshing all mention suggestionsclient.resolvers.invalidateMentionSuggestions();
When using React, you can retrieve client with
useClient. Learn more under
resolver methods in our docs.
Recently we
introduced attachments for Comments,
allowing you to upload media and files to individual comments. We’ve expanded
support for this into other parts of our product, for example you can now see
attachments in the dashboard and in our
Figma collaboration kit