
Security News
arXiv Is Rate Limiting Authors Following a Flood of AI Slop Submissions
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.
@featureflip/react
Advanced tools
React SDK for Featureflip - React bindings for feature flag evaluation
React bindings for Featureflip feature flag evaluation.
npm install @featureflip/react @featureflip/browser
Wrap your app with FeatureflipProvider, then use useFeatureFlag in any component.
import { FeatureflipProvider, useFeatureFlag } from '@featureflip/react';
function App() {
return (
<FeatureflipProvider clientKey="your-client-sdk-key">
<Banner />
</FeatureflipProvider>
);
}
function Banner() {
const showBanner = useFeatureFlag('show-banner', false);
if (!showBanner) return null;
return <div>New feature available!</div>;
}
| Prop | Type | Default | Description |
|---|---|---|---|
clientKey | string | (required) | Client SDK key |
context | Record<string, unknown> | undefined | Evaluation context (user attributes) |
baseUrl | string | undefined | Evaluation API base URL |
streaming | boolean | undefined | Enable SSE streaming |
sendEvaluationEvents | boolean | true | Passed to the browser SDK; see its README. |
The provider creates a FeatureflipClient internally and calls initialize() on mount. It cleans up (calls close()) on unmount.
useFeatureFlag<T>(key: string, defaultValue: T): TReturns the evaluated value of a flag. The component re-renders automatically when the flag value changes via streaming or identify(). The type of defaultValue determines which variation method is called (boolVariation, stringVariation, numberVariation, or jsonVariation).
const enabled = useFeatureFlag('new-checkout', false);
const color = useFeatureFlag('button-color', 'blue');
const limit = useFeatureFlag('rate-limit', 100);
const config = useFeatureFlag('ui-config', { sidebar: true });
useFeatureflipStatus(): { isReady, isError, error }Returns the initialization status of the client. Useful for showing loading states.
function App() {
const { isReady, isError, error } = useFeatureflipStatus();
if (isError) return <div>Error: {error?.message}</div>;
if (!isReady) return <div>Loading...</div>;
return <Main />;
}
useFeatureflipClient(): FeatureflipClientReturns the underlying FeatureflipClient instance for direct access (e.g., calling identify).
When the context prop changes, the provider automatically calls identify() and re-evaluates all flags. You can also call identify directly.
function LoginPage() {
const client = useFeatureflipClient();
async function handleLogin(userId: string) {
// ... authenticate ...
await client.identify({ user_id: userId, plan: 'pro' });
}
return <button onClick={() => handleLogin('123')}>Log in</button>;
}
Use TestFeatureflipProvider to supply predetermined flag values in tests -- no network calls, no initialization delay.
import { TestFeatureflipProvider } from '@featureflip/react';
import { render, screen } from '@testing-library/react';
test('renders banner when flag is on', () => {
render(
<TestFeatureflipProvider flags={{ 'show-banner': true }}>
<Banner />
</TestFeatureflipProvider>,
);
expect(screen.getByText('New feature available!')).toBeInTheDocument();
});
TestFeatureflipProvider uses FeatureflipClient.forTesting() internally and sets isReady: true immediately.
Apache-2.0
FAQs
React SDK for Featureflip - React bindings for feature flag evaluation
The npm package @featureflip/react receives a total of 12 weekly downloads. As such, @featureflip/react popularity was classified as not popular.
We found that @featureflip/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.

Research
/Security News
A new GhostAction wave hits hundreds of GitHub repos, expanding CI/CD secret theft to cloud and AI credentials in source code and git history.

Research
/Security News
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.