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
@@ -155,9 +155,16 @@ Sometimes, the value of a flag must consider some dynamic criteria about the app
155
155
In OpenFeature, we refer to this as [targeting](/specification/glossary#targeting).
156
156
If the flag management system you're using supports targeting, you can provide the input data using the [evaluation context](/docs/reference/concepts/evaluation-context).
157
157
158
+
```ts
159
+
// Sets global context during provider registration
Once context has been defined for a named client, it will override the global context for all clients using the associated provider.
256
+
Context can be cleared using for a named provider using `OpenFeature.clearContext("my-domain")` or call `OpenFeature.clearContexts()` to reset all context.
257
+
233
258
### Eventing
234
259
235
260
Events allow you to react to state changes in the provider or underlying flag management system, such as flag definition changes, provider readiness, or error conditions.
@@ -268,8 +280,9 @@ This can be disabled in the hook options (or in the [OpenFeatureProvider](#openf
268
280
269
281
The OpenFeature React SDK features built-in [suspense support](#suspense-support).
270
282
This means that it will render your loading fallback automatically while the your provider starts up, and during context reconciliation for any of your components using feature flags!
271
-
However, you will see this error if you neglect to create a suspense boundary around any components using feature flags; add a suspense boundary to resolve this issue.
272
-
Alternatively, you can disable this feature by setting `suspendWhileReconciling=false` and `suspendUntilReady=false` in the [evaluation hooks](#evaluation-hooks) or the [OpenFeatureProvider](#openfeatureprovider-context-provider) (which applies to all evaluation hooks in child components).
283
+
If you use suspense and neglect to create a suspense boundary around any components using feature flags, you will see this error.
284
+
Add a suspense boundary to resolve this issue.
285
+
Alternatively, you can disable this suspense (the default) by removing `suspendWhileReconciling=true`, `suspendUntilReady=true` or `suspend=true` in the [evaluation hooks](#evaluation-hooks) or the [OpenFeatureProvider](#openfeatureprovider-context-provider) (which applies to all evaluation hooks in child components).
273
286
274
287
> I get odd rendering issues, or errors when components mount, if I use the suspense features.
0 commit comments