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
{{ message }}
Repository navigation
Commit 7bb9855
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/browser-sdk/README.md
+16-18Lines changed: 16 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,27 +61,25 @@ await reflag.setContext({
61
61
awaitreflag.refresh();
62
62
```
63
63
64
-
`setContext()` replaces the context; update methods shallow-merge their section. User/company sections require IDs, including valid numeric zero. Context supports nested JSON and arrays. A context change clears the old context's values while fetching; stale/in-flight responses cannot replace a newer context or snapshot.
65
-
66
-
Values come from `GET /flags/evaluated`, not legacy `/features/evaluated`. Server evaluation retains the complete internal graph and authorized public roots. The Browser SDK does not cache dependency evaluations of its own.
64
+
`setContext()` replaces the whole context. The update methods merge new attributes into the user, company or other context. Users and companies need an `id`. While flags for a new context load, reads return their defaults.
Evaluated cache and override storage use isolated v2 keys. V1 cache entries are never interpreted as v2 values. Malformed refreshes leave known-good state intact. Valid saved v2 selections retain their real provenance on restore. There is no automatic periodic HTTP fallback after an SSE failure; manual refresh/context updates remain available.
Copy file name to clipboardExpand all lines: packages/react-sdk/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,10 +128,10 @@ To use a client you create yourself, pass it to `ReflagClientProvider`. Your app
128
128
129
129
## Context, loading and events
130
130
131
-
-`useUpdateUser()`, `useUpdateCompany()` and `useUpdateOtherContext()` return async shallow-update functions. `useClient().setContext(context)` replaces the whole context.
132
-
-Context changes clear old-context values while fetching. Stale/in-flight responses cannot replace a newer context/snapshot.
133
-
-`useIsLoading()` returns provider loading state. `loadingComponent`and`initialLoading`configure initial presentation; they are not getter arguments.
134
-
-`useClient()` returns the underlying Browser client. Its `getFlags()` returns all flag values; `getFlagResults()` is diagnostic-only.
131
+
-`useUpdateUser()`, `useUpdateCompany()` and `useUpdateOtherContext()` return functions that merge new attributes into the current context. `useClient().setContext(context)` replaces the whole context.
132
+
-While flags for a new context load, reads return their defaults.
133
+
-`useIsLoading()` returns provider loading state. Use `loadingComponent`or`initialLoading`to control what renders while flags load.
134
+
-`useClient()` returns the underlying Browser client.
135
135
-`useOnEvent(type, handler, client?)` subscribes and unsubscribes on unmount. A supplied external client works without a provider.
Copy file name to clipboardExpand all lines: packages/vue-sdk/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,13 +64,13 @@ The ref updates when flag values change. Each read records a check, which Reflag
64
64
65
65
## Loading, context and client access
66
66
67
-
-`useIsLoading()` returns a Boolean ref for provider loading; the `#loading` slot and`initialLoading` control initial presentation.
68
-
-`useUpdateUser()`, `useUpdateCompany()` and `useUpdateOtherContext()` return async shallow-update functions.
69
-
-`useClient()` exposes the Browser client, including `setContext(context)`, `refresh()` and `setFlagOverride(key, value)`. Undefined clears an override; null is a JSON override.
67
+
-`useIsLoading()` returns a Boolean ref for provider loading; use the `#loading` slot or`initialLoading`to control what renders while flags load.
68
+
-`useUpdateUser()`, `useUpdateCompany()` and `useUpdateOtherContext()` return functions that merge new attributes into the current context.
69
+
-`useClient()` exposes the Browser client, including `setContext(context)`, `refresh()` and `setFlagOverride(key, value)`. Pass `undefined` to remove an override.
70
70
-`getFlags()` returns all flag values and records a check for each.
71
71
-`useOnEvent(type, handler, client?)` subscribes on mount and unsubscribes on unmount. An external client may be supplied explicitly.
72
72
73
-
A context change clears old values while fetching. Late responses for previous contexts or lower snapshot versions cannot replace accepted state. V2 cache/override storage is isolated from v1. Browser fetching uses `/flags/evaluated` and never re-evaluates/caches dependencies locally.
73
+
While flags for a new context load, reads return their defaults.
0 commit comments