@liveblocks/client
Advanced tools
Changelog
v2.1.0
@liveblocks/client
@liveblocks/react
useStorageStatus
,
which returns the current storage status of the room, and will re-render your
component whenever it changes. This can used to build "Saving..." UIs.useDeleteThread
hook to delete a thread and its associated comments.@liveblocks/react-ui
useSyncExternalStore
import which would break on React versions
lower than 18.Changelog
v2.0.5
@liveblocks/react
useDeleteThread
will now throw a client-side error if someone
else than the thread owner tries to delete the thread. This will help you
catch and handle this case more easily.Changelog
v2.0.4
UserMeta
or
ActivitiesData
types do not match their requirements@liveblocks/client
CommentReaction
initialStorage
keys if the current user has
no write access to storage. This will no longer throw, but issue a warning
message in the console.@liveblocks/react
useDeleteThread
hook to delete a thread and its associated comments.Changelog
v2.0.3
@liveblocks/client
client.enterRoom()
, the options initialPresence
and initialStorage
are now only mandatory if your custom type requires them to be.@liveblocks/react
<RoomProvider>
, the props initialPresence
and initialStorage
are now
only mandatory if your custom type requires them to be.<LiveblocksProvider>
s will now throw to prevent incorrect usage.@liveblocks/react-ui
onComposerSubmit
)@liveblocks/yjs
Changelog
v2.0.2
@liveblocks/node
deleteThread
method to the client to delete a room's thread.threadDeleted
webhook event to notify when a thread is deleted.client.identifyUser()
and client.prepareSession()
to require userInfo
if it's mandatory according to your global UserMeta
type definition.Changelog
v2.0.0
This major release marks the maturity of Liveblocks. It contains new products
(@liveblocks/react-lexical
) and clarifications (e.g.
@liveblocks/react-comments
is now called @liveblocks/react-ui
).
Also, we bring major DX improvements by allowing you to specify your types globally now. These types will be typed once and shared across all Liveblocks APIs, which includes your Node backend.
// ❌ Before
export const {
suspense: {
RoomProvider,
useRoom,
// etc
},
} = createRoomContext<Presence, Storage>(client);
// ✅ After
declare global {
interface Liveblocks {
Presence: Presence;
Storage: Storage;
}
}
In @liveblocks/react
, you can now import hooks directly:
// ❌ Before: get hooks exported from your Liveblocks config
import { RoomProvider, useRoom, ... } from "./liveblocks.config";
// ✅ After: import hooks directly
import { RoomProvider, useRoom, ... } from "@liveblocks/react";
import { RoomProvider, useRoom, ... } from "@liveblocks/react/suspense";
// ❌ Before
const client = createClient(/* options */);
// ✅ After
<LiveblocksProvider /* options */>
<App />
</LiveblocksProvider>
For full upgrade instructions and codemods, see the 2.0 upgrade guide.
create-liveblocks-app
--upgrade
flag to automatically update all Liveblocks package to their
latest version.@liveblocks/client
@liveblocks/react
<ClientSideSuspense>
no longer needs a function as its
children
LiveblocksProvider
(replaces the need for createClient
)useClient
useMutation
error message to be less confusing.undefined
values.@liveblocks/react-ui
@liveblocks/react-comments
.<CommentsConfig />
to <LiveblocksUIConfig />
.InboxNotification
props types.@liveblocks/react-lexical
@liveblocks/node-lexical
@liveblocks/yjs
LiveblocksProvider
is no longer a default export, it’s now
import { LiveblocksYjsProvider } from "@liveblocks/yjs"
.@liveblocks/node
RoomInfo
to RoomData
.NotificationEvent
’s type can represent multiple kinds of
notifications. ("thread"
, "textMention"
, and custom ones (e.g.
"$myNotification"
))@liveblocks/codemod