Skip to content

Commit edd76ca

Browse files
committed
docs: replace direct-value terminology in framework READMEs
1 parent 2051aba commit edd76ca

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎packages/browser-sdk/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (enabled) {
2626

2727
Use only a **publishable** key in a browser. Secret keys belong on your server.
2828

29-
## Direct-value reads
29+
## Read flags
3030

3131
```ts
3232
reflag.getFlag("release"); // boolean; missing/mismatched -> false
@@ -43,7 +43,7 @@ reflag.getFlag("nullable-settings", null); // FlagValue (arbitrary JSON)
4343
- Object fields and array elements are **not schema-validated**. Validate untrusted/nested payloads in your application.
4444
- Values and defaults are returned as independent mutable copies. There are no reserved JSON property names.
4545

46-
`getFlags()` returns a direct-value record (entries may be undefined) and registers checks for its returned roots. `getFlagResults()` returns owned evaluated diagnostics **without checks**; it is intended for tooling, not ordinary application reads. `getFlagsForBootstrap()` serializes protocol-v2 evaluated state without checks.
46+
`getFlags()` returns a record of flag values (entries may be undefined) and registers checks for its returned roots. `getFlagResults()` returns owned evaluated diagnostics **without checks**; it is intended for tooling, not ordinary application reads. `getFlagsForBootstrap()` serializes protocol-v2 evaluated state without checks.
4747

4848
## Checks and delivery
4949

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ function StartHuddleButton() {
5050
}
5151
```
5252

53-
Defaults infer widened direct-value types without generated declarations. Accepted false, zero, empty strings and null are not replaced by truthy fallbacks. Explicit `null` requests arbitrary JSON; `undefined` retains the Boolean-first behavior. Returned JSON values are independent copies. Defaults check top-level categories, not nested runtime schemas.
53+
A default sets the return type, even without generated declarations. Accepted false, zero, empty strings and null are not replaced by truthy fallbacks. Explicit `null` requests arbitrary JSON; `undefined` retains the Boolean-first behavior. Returned JSON values are independent copies. Defaults check top-level categories, not nested runtime schemas.
5454

55-
Reading registers root checks immediately; application usage remains separate through `useTrack()`. `useClient().getFlags()` also returns direct values, not v1 flag wrappers. `useIsLoading()` reports readiness separately.
55+
Reading registers root checks immediately; application usage remains separate through `useTrack()`. `useClient().getFlags()` returns all flag values. `useIsLoading()` reports readiness separately.
5656

5757
## Suspense
5858

@@ -109,11 +109,11 @@ The envelope contains `protocolVersion: 2`, context, evaluated flags and an opti
109109

110110
The toolbar and built-in feedback UI are web-only and disabled by default. Use your own React Native feedback UI with `useSendFeedback()` or `client.feedback()`; enabling a web UI option does not make it React Native-compatible.
111111

112-
`enableTracking: false` disables checks and ordinary tracking. Offline mode skips HTTP/tracking; use direct-value fallbacks such as `fallbackFlags={{ huddle: true, settings: { mode: "offline" } }}`.
112+
`enableTracking: false` disables checks and ordinary tracking. Offline mode skips HTTP/tracking; set fallback values such as `fallbackFlags={{ huddle: true, settings: { mode: "offline" } }}`.
113113

114114
## Optional key registration
115115

116-
The React Native SDK reexports React's hooks and **shares React's `Flags` registry**. Register direct-value schemas in `@reflag/react-sdk`, not a separate React Native registry:
116+
The React Native SDK reexports React's hooks and **shares React's `Flags` registry**. Register flag types in `@reflag/react-sdk`, not a separate React Native registry:
117117

118118
```ts
119119
import "@reflag/react-native-sdk";

‎packages/react-sdk/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Reflag React SDK v2
22

3-
Direct-value feature flags for React, backed by [Browser SDK v2](../browser-sdk/README.md).
3+
Feature flags for React, built on the [Browser SDK](../browser-sdk/README.md).
44

55
## Setup
66

@@ -38,7 +38,7 @@ function Huddles() {
3838
}
3939
```
4040

41-
Bare reads return Boolean/false, including while initial data is unavailable. A positional default infers widened direct types, even without generated declarations:
41+
Bare reads return Boolean/false, including while initial data is unavailable. A default sets the return type, even without generated declarations:
4242

4343
```ts
4444
useFlag("model", "quick"); // string
@@ -129,7 +129,7 @@ For a pre-existing Browser v2 client, use `<ReflagClientProvider client={client}
129129
- `useUpdateUser()`, `useUpdateCompany()` and `useUpdateOtherContext()` return async shallow-update functions. `useClient().setContext(context)` replaces the whole context.
130130
- Context changes clear old-context values while fetching. Stale/in-flight responses cannot replace a newer context/snapshot.
131131
- `useIsLoading()` returns provider loading state. `loadingComponent` and `initialLoading` configure initial presentation; they are not getter arguments.
132-
- `useClient()` returns the underlying Browser client. Its `getFlags()` returns direct values/checks; `getFlagResults()` is diagnostic-only.
132+
- `useClient()` returns the underlying Browser client. Its `getFlags()` returns all flag values; `getFlagResults()` is diagnostic-only.
133133
- `useOnEvent(type, handler, client?)` subscribes and unsubscribes on unmount. A supplied external client works without a provider.
134134

135135
## Opt-in hooks

‎packages/vue-sdk/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Reflag Vue SDK v2
22

3-
Reactive direct-value flags for Vue 3, backed by [Browser SDK v2](../browser-sdk/README.md).
3+
Feature flags for Vue 3, built on the [Browser SDK](../browser-sdk/README.md).
44

55
## Setup
66

@@ -65,7 +65,7 @@ The ref updates when evaluated flags change. A composable read registers the req
6565
- `useIsLoading()` returns a Boolean ref for provider loading; the `#loading` slot and `initialLoading` control initial presentation.
6666
- `useUpdateUser()`, `useUpdateCompany()` and `useUpdateOtherContext()` return async shallow-update functions.
6767
- `useClient()` exposes the Browser client, including `setContext(context)`, `refresh()` and `setFlagOverride(key, value)`. Undefined clears an override; null is a JSON override.
68-
- `getFlags()` returns direct values and registers returned-root checks. Use `getFlagResults()` for tooling without checks.
68+
- `getFlags()` returns all flag values and records a check for each. Use `getFlagResults()` for tooling without checks.
6969
- `useOnEvent(type, handler, client?)` subscribes on mount and unsubscribes on unmount. An external client may be supplied explicitly.
7070

7171
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.

0 commit comments

Comments
 (0)