Skip to content

Commit 61bdd48

Browse files
committed
AI review 👍
1 parent 8f5edfa commit 61bdd48

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

packages/browser-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ type Configuration = {
105105
| Record<string, { key: string; payload: any } | true>; // Enable these features if unable to contact bucket.co. Can be a list of feature keys or a record with configuration values
106106
timeoutMs?: number; // Timeout for fetching features (default: 5000ms)
107107
staleWhileRevalidate?: boolean; // Revalidate in the background when cached features turn stale to avoid latency in the UI (default: false)
108-
staleTimeMs?: number; // at initialization time features are loaded from the cache unless they have gone stale. Defaults to 0 which means the cache is disabled. Increase in the case of a non-SPA
108+
staleTimeMs?: number; // at initialization time features are loaded from the cache unless they have gone stale. Defaults to 0 which means the cache is disabled. Increase this in the case of a non-SPA
109109
expireTimeMs?: number; // In case we're unable to fetch features from Bucket, cached/stale features will be used instead until they expire after `expireTimeMs`. Default is 30 days
110110
};
111111
```

packages/react-sdk/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Using the `useFeature` hook from your components lets you toggle features on/off
6666
function StartHuddleButton() {
6767
const {
6868
isEnabled, // boolean indicating if the feature is enabled
69+
track, // track usage of the feature
6970
} = useFeature("huddle");
7071

7172
if (!isEnabled) {
@@ -86,7 +87,7 @@ If you supply `user` or `company` objects, they must include at least the `id` p
8687
In addition to the `id`, you must also supply anything additional that you want to be able to evaluate feature targeting rules against.
8788
The additional attributes are supplied using the `otherContext` prop.
8889

89-
Attributes cannot be nested (multiple levels) and must be either strings, integers or booleans.
90+
Attributes cannot be nested (multiple levels) and must be either strings, numbers or booleans.
9091
A number of special attributes exist:
9192

9293
- `name` -- display name for `user`/`company`,
@@ -138,7 +139,7 @@ generates a `check` event.
138139

139140
## `<BucketProvider>` component
140141

141-
The `<BucketProvider>` initializes the Bucket SDK, fetch features and start listening for automated feedback survey events. The component can be configured using a number of props:
142+
The `<BucketProvider>` initializes the Bucket SDK, fetches features and starts listening for automated feedback survey events. The component can be configured using a number of props:
142143

143144
- `publishableKey` is used to connect the provider to an _environment_ on Bucket. Find your `publishableKey` under [environment settings](https://app.bucket.co/envs/current/settings/app-environments) in Bucket,
144145
- `company`, `user` and `otherContext` make up the _context_ that is used to determine if a feature is enabled or not. `company` and `user` contexts are automatically transmitted to Bucket servers so the Bucket app can show you which companies have access to which features etc.
@@ -187,7 +188,7 @@ The `<BucketProvider>` initializes the Bucket SDK, fetch features and start list
187188
<BucketProvider>
188189
```
189190

190-
- `enableTracking` Set to `false` to stop sending tracking events and user/company updates to Bucket. Useful when you're impersonating a user (defaults to `true`),
191+
- `enableTracking`: Set to `false` to stop sending tracking events and user/company updates to Bucket. Useful when you're impersonating a user (defaults to `true`),
191192
- `apiBaseUrl`: Optional base URL for the Bucket API. Use this to override the default API endpoint,
192193
- `appBaseUrl`: Optional base URL for the Bucket application. Use this to override the default app URL,
193194
- `sseBaseUrl`: Optional base URL for Server-Sent Events. Use this to override the default SSE endpoint,
@@ -231,7 +232,7 @@ function StartHuddleButton() {
231232
<button
232233
onClick={(e) =>
233234
requestFeedback({
234-
title: payload?.question ?? "How do you like Huddles?",
235+
title: payload?.question ?? "How do you like the Huddles feature?",
235236
position: {
236237
type: "POPOVER",
237238
anchor: e.currentTarget as HTMLElement,

0 commit comments

Comments
 (0)