All packages now provide an isReadOnly
flag on user instances. It is available when getting self or others. isReadOnly
is true when storage is read-only, see the room management guide for more information.
const me = room.getSelf();
me.isReadOnly; // boolean
const others = room.getOthers();
for (const other of others) {
other.isReadOnly; // boolean
}
In @liveblocks/client:
-
Add a new option
shouldInitiallyConnect
toclient.enter
that let you control whether or not the room connects to Liveblock servers. Default is true.Usually set to false when the client is used from the server to not call the authentication endpoint or connect via WebSocket.
In @liveblocks/react:
-
Add a new property
shouldInitiallyConnect
toRoomProvider
that let you control whether or not the room connects to Liveblock servers. Default is true.By default equals to
typeof window !== "undefined"
, meaning the RoomProvider tries to connect to Liveblocks servers only on the client side. -
Internal package restructurings to increase code sharing. You may notice a new dependency show up in your dependency tree:
@liveblocks/core
. It contains private APIs that aren't intended for direct consumption.