npm install '@rocicorp/[email protected]'
(as compared to [email protected]
)
useSubscribe
: The def
argument used to be returned only until the query first resolved. Now it is also returned if the query returns undefined
. This simplifies common usage.Before:
```tsx
useSubscribe(r, async tx => (await tx.get("count")) ?? 0, 0)
```
**Now:**
```tsx
// 0 is returned initially, but also if "count" key is not set.
useSubscribe(r, tx => tx.get("count"), 0)
```
Reflect
works in web workers again. Added a unit test to prevent regression.reflect tail
in case of room name typo.useSubscribe
is technically a breaking change, though we would be very surprised if anyone was relying on this.