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
Copy file name to clipboardExpand all lines: packages/react/src/context/use-context-mutator.ts
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -5,33 +5,38 @@ import { Context } from '../common';
5
5
6
6
exporttypeContextMutationOptions={
7
7
/**
8
-
* Apply changes to the default context instead of the domain scoped context applied at the <OpenFeatureProvider/>.
9
-
* Note, if the <OpenFeatureProvider/> has no domain specified, the default is used.
8
+
* Mutate the default context instead of the domain scoped context applied at the `<OpenFeatureProvider/>`.
9
+
* Note, if the `<OpenFeatureProvider/>` has no domain specified, the default is used.
10
+
* See the {@link https://openfeature.dev/docs/reference/technologies/client/web/#manage-evaluation-context-for-domains|documentation} for more information.
11
+
* @default false
10
12
*/
11
-
default?: boolean;
13
+
defaultContext?: boolean;
12
14
};
13
15
14
16
exporttypeContextMutation={
15
17
/**
16
18
* A function to set the desired context (see: {@link ContextMutationOptions} for details).
19
+
* There's generally no need to await the result of this function; flag evaluation hooks will re-render when the context is updated.
20
+
* This promise never rejects.
17
21
* @param updatedContext
18
-
* @returns
22
+
* @returns Promise for awaiting the context update
0 commit comments