Skip to content

Commit 328494c

Browse files
committed
docs: simplify bootstrap sections in framework READMEs
1 parent b6d0a95 commit 328494c

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎packages/browser-sdk/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ Overrides apply after server evaluation and do not rewrite authored dependency r
101101

102102
## Server bootstrap
103103

104-
Generate the full payload with **Node SDK v2** on your server:
104+
Get the bootstrap data from the Node.js SDK on your server:
105105

106106
```ts
107107
const bootstrappedState = serverClient.getFlagsForBootstrap(context);
108-
// Send via your framework's safe JSON/hydration mechanism.
108+
// Serialize this into the page with your framework's usual mechanism.
109109
```
110110

111111
```ts
@@ -114,7 +114,7 @@ await reflag.initialize();
114114
const enabled = reflag.getFlag("release");
115115
```
116116

117-
The payload includes `protocolVersion: 2`, context, evaluated diagnostics/selections and an optional snapshot version. V1 payloads and the old `bootstrappedFlags` option are rejected. Preserve the entire envelope; do not pass just its `flags` property. A version is required for bootstrapped live updates. Later refreshes use browser-visible context and can differ from server-only evaluation; disable live updates when that is inappropriate. Requesting missing opt-in metadata still makes a browser-side request even when live updates are disabled.
117+
Pass the whole object, not just its `flags`. Flags are then available immediately, without a network request. With live updates on, later refreshes evaluate flags using the browser's context, so values that depend on server-only attributes can change. Set `enableLiveFlagUpdates: false` if they must not.
118118

119119
## End-user opt-in
120120

‎packages/react-native-sdk/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ function Huddles() {
7575

7676
A missing flag uses its default after initialization rather than suspending forever. Provider `suspense` and `useOptInFlags({ suspense: true })` control opt-in metadata loading, not ordinary flag reads. An object passed as `useFlag`'s second argument is a JSON default, not loading options.
7777

78-
## Bootstrap from Node v2
78+
## Bootstrap from the server
7979

80-
Produce the envelope on your server using Node SDK v2:
80+
Get the bootstrap data from the Node.js SDK on your server:
8181

8282
```ts
8383
const flags = serverClient.getFlagsForBootstrap({
@@ -86,7 +86,7 @@ const flags = serverClient.getFlagsForBootstrap({
8686
});
8787
```
8888

89-
Pass the complete serialized envelope to the React Native provider:
89+
Pass the whole object to `ReflagBootstrappedProvider`:
9090

9191
```tsx
9292
import { ReflagBootstrappedProvider } from "@reflag/react-native-sdk";
@@ -99,9 +99,9 @@ import { ReflagBootstrappedProvider } from "@reflag/react-native-sdk";
9999
</ReflagBootstrappedProvider>;
100100
```
101101

102-
The envelope contains `protocolVersion: 2`, context, evaluated flags and an optional snapshot version. Legacy v1 bootstrap is rejected. Live updates require a snapshot version. Later refreshes use app-visible context and may differ from server evaluation. Disable live updates when later client evaluation must not replace the server result. Requesting missing opt-in metadata still makes a client-side request even with live updates disabled.
102+
Flags are then available immediately, without a network request. With live updates on, later refreshes evaluate flags using the app's context, so values that depend on server-only attributes can change. Set `enableLiveFlagUpdates={false}` if they must not.
103103

104-
`ReflagClientProvider` accepts an externally initialized matching v2 client. Its lifecycle and platform-adapter configuration belong to your application; the React Native convenience providers do not configure an external client.
104+
To use a client you create yourself, pass it to `ReflagClientProvider`. Your app is then responsible for initializing and stopping it, and for configuring its storage and live updates.
105105

106106
## Opt-in and feedback
107107

‎packages/react-sdk/README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ Registered flags get autocompletion for their keys and type checks for the defau
104104

105105
## Bootstrap and SSR
106106

107-
On the server, use Node SDK v2:
107+
Get the bootstrap data from the Node.js SDK on your server:
108108

109109
```ts
110110
const flags = serverClient.getFlagsForBootstrap(context);
111111
```
112112

113-
Pass the **entire** safe, serialized envelope to the client provider:
113+
Pass the whole object to `ReflagBootstrappedProvider`:
114114

115115
```tsx
116116
import { ReflagBootstrappedProvider } from "@reflag/react-sdk";
@@ -120,9 +120,9 @@ import { ReflagBootstrappedProvider } from "@reflag/react-sdk";
120120
</ReflagBootstrappedProvider>;
121121
```
122122

123-
The envelope includes `protocolVersion: 2`, context, evaluated flag results and optional `flagStateVersion`. V1 bootstrap is rejected. Use a snapshot version for live updates; later refreshes use browser-visible context. Disable live updates if later browser evaluation must not replace server-only results. Requesting missing opt-in metadata still makes a browser-side request even when live updates are disabled.
123+
Flags are then available immediately, without a network request. With live updates on, later refreshes evaluate flags using the browser's context, so values that depend on server-only attributes can change. Set `enableLiveFlagUpdates={false}` if they must not.
124124

125-
For a pre-existing Browser v2 client, use `<ReflagClientProvider client={client}>`. The provider does not own its lifecycle; initialize/stop externally, except that a suspending read can start on-demand initialization.
125+
To use a client you create yourself, pass it to `ReflagClientProvider`. Your app is then responsible for initializing and stopping it.
126126

127127
## Context, loading and events
128128

‎packages/vue-sdk/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ A context change clears old values while fetching. Late responses for previous c
7272

7373
## Bootstrap
7474

75-
On the server, use Node SDK v2 and your framework's safe serialization mechanism:
75+
Get the bootstrap data from the Node.js SDK on your server, and serialize it into the page with your framework's usual mechanism:
7676

7777
```ts
7878
const flags = serverClient.getFlagsForBootstrap(context);
@@ -84,9 +84,9 @@ const flags = serverClient.getFlagsForBootstrap(context);
8484
</ReflagBootstrappedProvider>
8585
```
8686

87-
Pass the entire envelope (`protocolVersion: 2`, context, evaluated flags and optional snapshot version). Legacy v1 bootstrap is rejected. A snapshot version is required for live updates. Later refreshes use browser-visible context, so disable live updates when they must not replace server-only evaluations. Requesting missing opt-in metadata still makes a browser-side request even when live updates are disabled.
87+
Pass the whole object to `ReflagBootstrappedProvider`. Flags are then available immediately, without a network request. With live updates on, later refreshes evaluate flags using the browser's context, so values that depend on server-only attributes can change. Set `:enable-live-flag-updates="false"` if they must not.
8888

89-
`ReflagClientProvider` accepts an externally initialized Browser v2 client. Its lifecycle belongs to the application.
89+
To use a client you create yourself, pass it to `ReflagClientProvider`. Your app is then responsible for initializing and stopping it.
9090

9191
## Opt-in, tracking and feedback
9292

0 commit comments

Comments
 (0)