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)
-
v0.18.0 For information, please read our Upgrade Guide for 0.18.
New React hooks ✨
-
In @liveblocks/react:
-
In @liveblocks/client:
- New
.toImmutable()method onLiveObject,LiveList, andLiveMaplets you work with an immutable representation of the storage objects - Improved core performance
- Reduced bundle size
- Others only become visible in the
othersarray if their presence is known
- New
Breaking changes
- Remove support for directly importing hooks from @liveblocks/client (e.g.
import { useMyPresence } from '@liveblocks/react'). If you’re still using these imports, see the Upgrade Guide for 0.17 for instructions. - Remove
ClientProvideranduseClienthook - Remove
defaultPresenceanddefaultStorageRootarguments. (Just useinitialPresenceandinitialStoragearguments now.) - Remove second argument to
useMap(),useList(), anduseObject(). - Remove
new LiveMap(null)support. (Just usenew LiveMap()ornew LiveMap([]).)
-
v0.17.11 General:
- Fix a packaging bug
In @liveblocks/react:
- Deprecate an undocumented API
v0.17.9 - Fix bug that could cause duplicate copies of @liveblocks/client to end up in final bundle, for certain bundler configurations.
- Fix bug where in some conditions the initial presence for a new connection would not come through to all existing clients in the room
- Various internal changes
v0.17.8 New history APIs ↩️ ↪️
-
In @liveblocks/client:
- Add
canUndo()andcanRedo()utilities toroom.history - Add
"history"event type toroom.subscribe()to subscribe to the current user's history changes
- Add
-
In @liveblocks/react:
- Add
useCanUndo()anduseCanRedo()hooks
- Add
-
v0.17.7 -
In @liveblocks/zustand:
- Simplify zustand middleware integration with Typescript.
TPresence,TStorage,TUserMeta, andTRoomEventare now optional.
- Simplify zustand middleware integration with Typescript.
Note that
@liveblocks/zustanddoes not work with zustand > v4 because v3 and v4 have completely different type definitions. As soon as zustand v4 is out of the RC phase, we will consider updating our middleware to work with the latest version.Let's take a look at our To-do list example. Without our middleware, the store would look like this:
With our middleware, you simply need to move the
Stateparam at the middleware level:If you want to type
otherspresence, you can use theTPresencegeneric argument on the middleware.-
v0.17.6 -
In @liveblocks/react:
- Expose
RoomContextin the return value ofcreateRoomContext()
- Expose
-
v0.17.5 -
In @liveblocks/react:
- Fix bug where changing the
keyargument ofuseMap(),useList(),useObject()did not resubscribe to updates correctly - Ignore changes to the
RoomProvider's initial presence/storage props on subsequent renders. This makes it behave closer touseState(initialState)
- Fix bug where changing the
-
v0.17.4 Fix missing documentation for hooks created via
createRoomContext().v0.17.1 Fix
@liveblocks/nodespackaging.