We’ve made React changes, affecting how our error listener hook works, and how undefined metadata is filtered in Comments.
Upgrade to 2.16 by downloading the latest version of each Liveblocks package you’re using. The easiest way to do this is to run the following command:
If you’re using the useErrorListener
hook, please read about
a behavior change.
If you’re using Comments in React, please read about the change to metadata filtering.
Otherwise, no changes will affect you.
useErrorListener
From 2.16, useErrorListener
will notify you about new errors. Previously,
only room connection errors were previously reported, possible if you were using
Presence, Storage, or Yjs. After upgrading, you can also receive a number of
errors from Comments and Notifications.
For a full list of possible errors, see the useErrorListener
documentation.
We have also decoupled useErrorListener
from the current room. Previously
it required to be nested under a
RoomProvider
. Now, you
can use it anywhere under
LiveblocksProvider
,
and it will notify you about errors from all rooms.
No changes are necessary to upgrade, however if you would like to keep the old behavior and only show room connection errors, you can filter out all new errors with an early return:
From 2.16, the useThreads
(and useUserThreads_experimental
) hooks
supports filtering by absence of a metadata field using null
.
Previously this was not supported, but due to a bug, using an explicit
undefined
would already allow you to do this. However, threads weren’t
filtered correctly in our back end causing over-fetches.
If you relied on this bug, change undefined
to null
in any metadata
properties. This will keep behavior the same—if you don’t make this change,
then your previous filtering will no longer work.
That’s it for 2.16!
We use cookies to collect data to improve your experience on our site. Read our Privacy Policy to learn more.