Upgrading - Upgrading to 1.9

There’s a tiny breaking change related to Comments in this update. Each date returned is now a Date object, whereas previously each was a string.

How to upgrade?

You can upgrade to 1.9 by downloading the latest version of each Liveblocks package you’re using, for example in a React app:

$npm install @liveblocks/client@latest @liveblocks/react@latest @liveblocks/react-comments@latest @liveblocks/node@latest

Dates are no longer strings

Each date returned from Comments is now a Date object, whereas previously each was a string. An example of this is createdAt, a value attached to each thread.

Before:

// ❌ Before - Liveblocks 1.8const { threads } = useThreads();
// "2023-12-15T14:15:22Z"console.log(threads[0].createdAt);

After:

// ✅ After - Liveblocks 1.9const { threads } = useThreads();
// Date <Fri Dec 15 2023 14:15:22 GMT+0000 (Greenwich Mean Time)>console.log(threads[0].createdAt);

Every Comments-related date has been updated, such as createdAt, updatedAt properties in threads, and editedAt, deletedAt in comments, so take care to check every date instance you’re using. It’s likely that no changes are required after this update.