Skip to content

Commit 64bf707

Browse files
committed
docs(node-sdk): clarify bootstrap compatibility and tracking controls
1 parent a4e6d19 commit 64bf707

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎packages/node-sdk/README.md‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,15 @@ Declarations are checked at compile time only. See the [Reflag CLI](https://docs
172172

173173
## Bootstrap the browser
174174

175-
To render flags in the browser without waiting for a network request, evaluate them on the server and pass the result to the Browser, React or Vue SDK's bootstrap option:
175+
**Requires a Browser, React or Vue SDK that supports the v2 bootstrap protocol.** V1 consumers expect a different flag shape and cannot use this result.
176+
177+
With a compatible v2 consumer, evaluate flags on the server to render them in the browser without waiting for a network request:
176178

177179
```ts
178180
const bootstrap = reflag.getFlagsForBootstrap(context);
179181
```
180182

181-
Pass the whole object, serialized with your framework's usual mechanism. Leave secrets and server-only attributes out of the context you bootstrap, because the browser can read it.
183+
Pass the whole object to the compatible consumer's bootstrap option, serialized with your framework's usual mechanism. Do not pass it to a v1 SDK. Leave secrets and server-only attributes out of the context you bootstrap, because the browser can read it.
182184

183185
## Remote evaluation
184186

@@ -237,7 +239,14 @@ Options can be set in the constructor, through environment variables, or in `ref
237239
| `batchOptions` | | Event batching: `maxSize`, `intervalMs` and `flushOnExit` |
238240
| `httpClient` | | Custom HTTP client |
239241

240-
To stop sending checks and events for a context, include `enableTracking: false` in it.
242+
To disable checks, automatic user/company updates and bound-client usage tracking for a context, pass `enableTracking: false` to reads or `bindClient()`, not to the constructor:
243+
244+
```ts
245+
reflag.getFlag({ ...context, enableTracking: false }, "new-editor");
246+
const untracked = reflag.bindClient({ ...context, enableTracking: false });
247+
```
248+
249+
Explicit calls to the root client's `track()`, `updateUser()` and `updateCompany()` remain separate operations and still send events.
241250

242251
## Shutting down
243252

0 commit comments

Comments
 (0)