Skip to content

Commit e6014f4

Browse files
committed
Update changeset
1 parent 4980591 commit e6014f4

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

.changeset/clever-friends-carry.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
---
22
"@knocklabs/client": minor
3+
"@knocklabs/react-core": minor
4+
"@knocklabs/expo": minor
5+
"@knocklabs/react": minor
6+
"@knocklabs/react-native": minor
37
---
48

59
Initialize feeds in `"compact"` mode by default
610

711
The feed client can now be initialized with a `mode` option, set to either `"compact"` or `"rich"`. When `mode` is `"compact"`, the `activities` and `total_activities` fields will _not_ be present on feed items.
812

13+
**By default, feeds are initialized in `"compact"` mode. If you need to access `activities` and/or `total_activities`, you must initialize your feed in `"rich"` mode.**
14+
15+
If you are using the feed client via `@knocklabs/client` directly:
16+
917
```js
1018
const knockFeed = knockClient.feeds.initialize(
1119
process.env.KNOCK_FEED_CHANNEL_ID,
12-
{ mode: "compact" },
20+
{ mode: "full" },
1321
);
1422
```
1523

16-
**By default, feeds are initialized in `"compact"` mode. If you need to access `activities` and/or `total_activities`, you must initialize your feed in `"rich"` mode.**
24+
If you are using `<KnockFeedProvider>` via `@knocklabs/react`, `@knocklabs/react-native`, or `@knocklabs/expo`:
25+
26+
```tsx
27+
<KnockFeedProvider
28+
feedId={process.env.KNOCK_FEED_CHANNEL_ID}
29+
defaultFeedOptions={{ mode: "full" }}
30+
/>
31+
```
32+
33+
If you are using the `useNotifications` hook via `@knocklabs/react-core`:
34+
35+
```js
36+
const feedClient = useNotifications(
37+
knockClient,
38+
process.env.KNOCK_FEED_CHANNEL_ID,
39+
{ mode: "full" },
40+
);
41+
```

0 commit comments

Comments
 (0)