@liveblocks/node
Advanced tools
Changelog
v0.18.3
In @liveblocks/react:
Fixes the "zombie-child" problem that can occur with React 17 or lower. If
you’re on React 18: great, you can ignore this! If you’re using React 17 or
lower with Liveblocks, we’ll now start to enforce that you pass the
unstable_batchedUpdates
prop to RoomProvider, so this problem can be
circumvented. This small addition may save you hours of debugging time!
// ⚠️ Only if you’re using React 17 or lower
import { unstable_batchedUpdates } from "react-dom"; // 👈
<RoomProvider
id="my-room"
initialPresence={...}
initialStorage={...}
unstable_batchedUpdates={unstable_batchedUpdates} // 👈
>
<App />
</RoomProvider>
To read more, see https://liveblocks.io/docs/guides/troubleshooting#stale-props-zombie-child
In @liveblocks/zustand:
Changelog
v0.18.2
In @liveblocks/react:
useOther
will not rerender if tracked users already left
the room, so that child components won't get rerendered before the parent
got the chance to unmount them.useOther
without selectorChangelog
v0.18.1
In @liveblocks/react:
Changelog
v0.18.0
For information, please read our Upgrade Guide for 0.18.
In @liveblocks/react:
In @liveblocks/client:
.toImmutable()
method on LiveObject
, LiveList
, and LiveMap
lets you work with an
immutable representation of the storage objectsothers
array if their presence is knownimport { useMyPresence } from '@liveblocks/react'
). If you’re still using
these imports, see the
Upgrade Guide for 0.17
for instructions.ClientProvider
and useClient
hookdefaultPresence
and defaultStorageRoot
arguments. (Just use
initialPresence
and initialStorage
arguments now.)useMap()
, useList()
, and useObject()
.new LiveMap(null)
support. (Just use new LiveMap()
or
new LiveMap([])
.)