Skip to content

Commit 82c4962

Browse files
committed
docs(changeset): note bootstrapped compatibility
1 parent e8f370f commit 82c4962

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

‎.changeset/bright-cobras-help.md‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,34 @@
66
"@reflag/vue-sdk": minor
77
---
88

9-
Add live flag updates and full bootstrapped state support to the browser-facing SDKs.
9+
Add live flag updates and full bootstrapped state support to the client-facing SDKs.
1010

1111
The browser SDK now supports `enableLiveFlagUpdates`, which subscribes to Reflag's SSE endpoint and refreshes flags automatically after live update notifications. The browser SDK keeps this disabled by default, while the React, React Native, and Vue SDKs enable it by default.
1212

1313
React Native now includes a built-in SSE transport via `react-native-sse`, so live updates work out of the box without requiring a global `EventSource` shim.
1414

15-
The browser SDK now accepts `bootstrappedState`, and the React, React Native, and Vue bootstrapped providers now accept the same full bootstrapped state object through their `flags` prop. The object contains `context`, evaluated `flags`, and an optional `flagStateVersion`. The Node SDK's `getFlagsForBootstrap()` now includes `flagStateVersion` when it is known, so you can pass the full object directly instead of deconstructing it first:
15+
The browser SDK now accepts `bootstrappedState`. The React, React Native, and Vue bootstrapped providers keep their existing `flags` prop, and that prop now accepts the same full bootstrapped state object. The object contains `context`, evaluated `flags`, and an optional `flagStateVersion`. Existing bootstrapped payloads shaped as `{ context, flags }` continue to initialize the SDK; the provider prop name has not changed.
1616

17-
```ts
17+
The recommended bootstrapping approach is now to pass the full object returned by the Node SDK's `getFlagsForBootstrap()` instead of deconstructing it first:
18+
19+
```tsx
1820
const bootstrappedState = serverClient.getFlagsForBootstrap(context);
1921

2022
const client = new ReflagClient({
2123
publishableKey,
2224
bootstrappedState,
2325
});
26+
27+
<ReflagBootstrappedProvider
28+
publishableKey={publishableKey}
29+
flags={bootstrappedState}
30+
>
31+
{children}
32+
</ReflagBootstrappedProvider>;
2433
```
2534

26-
`flagStateVersion` is now preserved and used to avoid redundant refreshes immediately after bootstrapping, ignore stale bootstrapped payloads, and request the newest flag state after a live update. Bootstrapped live updates require a recent `@reflag/node-sdk` so `getFlagsForBootstrap()` includes `flagStateVersion`; otherwise the SDK will warn and disable live flag updates for that client.
35+
`flagStateVersion` is now preserved and used to avoid redundant refreshes immediately after bootstrapping, ignore stale bootstrapped payloads, and request the newest flag state after a live update. Bootstrapped live updates require a recent `@reflag/node-sdk` so `getFlagsForBootstrap()` includes `flagStateVersion`; otherwise the SDK will warn and disable live flag updates for that client. Existing unversioned bootstraps still work for initial rendering; set `enableLiveFlagUpdates={false}` if you intentionally use unversioned bootstrap data and want to avoid that warning.
2736

28-
Browser-facing SDKs now default SSE requests to `apiBaseUrl` and subscribe through `https://front.reflag.com/sse/client?publishableKey=...`. SSE requests include the publishable key and SDK version. `sseBaseUrl` remains available as a temporary compatibility override if you still need a separate pubsub host.
37+
Browser-facing SDKs now default SSE requests to `apiBaseUrl` and subscribe through `https://front.reflag.com/sse/client?publishableKey=...`. SSE requests include the publishable key and SDK version. `sseBaseUrl` remains available as a temporary compatibility override if you need a separate SSE host.
2938

3039
The Node SDK now uses Reflag's server push SSE endpoint (`GET https://front.reflag.com/sse/server`) for live flag definition updates. If you override `flagsPushUrl`, the SDK will open that URL with the same authenticated streaming GET behavior.

0 commit comments

Comments
 (0)