-{`import { useFlagValue } from '@databuddy/sdk/react';
-
-function MyComponent() {
- const maxItems = useFlagValue('max-items', 10);
- const theme = useFlagValue<'light' | 'dark'>('theme', 'light');
-
- return (
-
- Showing {maxItems} items
-
- );
-}`}
+ {`import { useFlagValue } from '@databuddy/sdk/react';
+
+ function MyComponent() {
+ const maxItems = useFlagValue('max-items', 10);
+ const theme = useFlagValue<'light' | 'dark'>('theme', 'light');
+
+ return (
+
+ Showing {maxItems} items
+
+ );
+ }`}
### `useVariant(key)` - A/B Testing
@@ -185,16 +185,16 @@ function MyComponent() {
Get the variant name for multivariate testing.