You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/browser-sdk/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,7 @@ type Configuration = {
105
105
|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
106
106
timeoutMs?:number; // Timeout for fetching features (default: 5000ms)
107
107
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
109
109
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
Copy file name to clipboardExpand all lines: packages/react-sdk/README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@ Using the `useFeature` hook from your components lets you toggle features on/off
66
66
function StartHuddleButton() {
67
67
const {
68
68
isEnabled, // boolean indicating if the feature is enabled
69
+
track, // track usage of the feature
69
70
} =useFeature("huddle");
70
71
71
72
if (!isEnabled) {
@@ -86,7 +87,7 @@ If you supply `user` or `company` objects, they must include at least the `id` p
86
87
In addition to the `id`, you must also supply anything additional that you want to be able to evaluate feature targeting rules against.
87
88
The additional attributes are supplied using the `otherContext` prop.
88
89
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.
90
91
A number of special attributes exist:
91
92
92
93
-`name` -- display name for `user`/`company`,
@@ -138,7 +139,7 @@ generates a `check` event.
138
139
139
140
## `<BucketProvider>` component
140
141
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:
142
143
143
144
- `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,
144
145
- `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
187
188
<BucketProvider>
188
189
```
189
190
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`),
191
192
- `apiBaseUrl`: Optional base URL for the Bucket API. Use this to override the default API endpoint,
192
193
- `appBaseUrl`: Optional base URL for the Bucket application. Use this to override the default app URL,
193
194
- `sseBaseUrl`: Optional base URL for Server-Sent Events. Use this to override the default SSE endpoint,
@@ -231,7 +232,7 @@ function StartHuddleButton() {
231
232
<button
232
233
onClick={(e) =>
233
234
requestFeedback({
234
-
title: payload?.question??"How do you like Huddles?",
235
+
title: payload?.question??"How do you like the Huddles feature?",
0 commit comments