v0.19.4 Fix CORS issue.
v0.19.3 In @liveblocks/client:
Room.getStorageStatus
Get the storage status.
not-loaded: Initial state when entering the room.loading: Once the storage has been requested via room.getStorage().synchronizing: When some local updates have not been acknowledged by Liveblocks servers.synchronized: Storage is in sync with Liveblocks servers.
Room.subscribe("storage-status", status => )
Subscribe to storage status changes.
Returns an unsubscribe function.
Room.reconnect
Close the room connection and try to reconnect.
Internal changes
- Add support for the upcoming Liveblocks browser extension
v0.19.2 Fixes some internal type definitions.
v0.19.1 Fixes an issue where
imports from Liveblocks packages could not be resolved correctly in certain build environments.v0.19.0 This release brings Zustand v4 support. This is a breaking change only if you’re using @liveblocks/zustand.
In @liveblocks/zustand:
- Support Zustand v4 (actually v4.1.3 or higher)
- Drop support for Zustand v3 (also v4.1.2 or lower are not supported)
- Fix bug where some usage pattern could cause the Zustand store to stop synching (#491)
To migrate, make the following code changes:
npm install zustand@latestnpm install @liveblocks/zustand@latest- Change these imports, if applicable:
andand rename accordingly.
- Change the pattern:
to the Zustand v4 recommended pattern:To be clear:
- First, move the type annotation away from the
liveblocksmiddleware call, and onto thecreatecall. - Next, wrap your
MyStatetype in aWithLiveblocks<...>wrapper. This will make sure the injectedliveblocksproperty on your Zustand state will be correctly typed. - Finally, make sure to add the extra call
()wrapper, needed by Zustand v4 now:
- First, move the type annotation away from the
- Remove the second argument to
state.liveblocks.enterRoom(): it no longer takes an explicit initial state. Instead, it's automatically be populated from your Zustand state.
In @liveblocks/redux:
- The main export has been renamed:
- The second argument to
state.liveblocks.enterRoom()to send in an explicit initial state is no longer supported. It will use the state in your Redux store, for consistency and ease of use.
v0.18.5 Bug fix:
- Fixes a small bug in a type definition,
scopeswas removed fromBaseUserMeta.
Internal updates:
- Switch the monorepo over to Turborepo.
- Fixes a small bug in a type definition,
v0.18.4 All packages now provide an
isReadOnlyflag on user instances. It is available when getting self or others.isReadOnlyis true when storage is read-only, see the room management guide for more information.In @liveblocks/client:
-
Add a new option
shouldInitiallyConnecttoclient.enterthat let you control whether or not the room connects to Liveblocks servers. Default istrue.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
shouldInitiallyConnecttoRoomProviderthat let you control whether or not the room connects to Liveblocks servers. Default istrue.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.
-
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_batchedUpdatesprop to RoomProvider, so this problem can be circumvented. This small addition may save you hours of debugging time!To read more, see https://liveblocks.io/docs/guides/troubleshooting#stale-props-zombie-child
-
In @liveblocks/zustand:
- Fix a confusing error message
-
v0.18.2 -
In @liveblocks/react:
- Make sure that
useOtherwill 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. - Disallow
useOtherwithout selector
- Make sure that
-
v0.18.1 -
In @liveblocks/react:
- Fix a bug that could cause an error when patching presence during local development. Not an issue in production builds. (#505)
-