Feature flags for React.
Use feature flags in your React apps to deploy new features faster, release confidently, and create a personalized user experience.
Decouple deployments from releases in React
Are you upping your JavaScript game with React? Looking to build more dynamic web applications across multiple platforms? Do you want to use feature flags (feature toggles) to deploy new features to a subset of users, instantly roll back code, and A/B test in production? We’ve got you. Start feature flagging with LaunchDarkly’s React SDK.
Why feature flag management?
LaunchDarkly’s feature management platform enables you to use feature flags on a massive scale across a variety of complex use cases. Unlike environment variables, LaunchDarkly flags let you progressively roll out new features to targeted groups of users, disable problematic code paths in 200ms, and take complete control over every feature in your React app.
Get started with LaunchDarkly for React
Install the SDK
npm install launchdarkly-react-client-sdk
Bring the SDK into your code
import { withLDProvider, useFlags } from 'launchdarkly-react-client-sdk';
function App() {
const { newHeader } = useFlags()
return (
...
);
}
export default withLDProvider({
clientSideID: LD_SDK_KEY,
options: {
bootstrap:'localStorage'
},
})(App);
Start evaluating flags
return (
<div className="App">
{newHeader ? (<Header />): (<div />)}
</div>
);
Feature flags are a critical piece of modern development, and LaunchDarkly brings this part of continuous delivery to the masses.
CircleCI
Rob Zuber
CTO
Introducing feature flag management for React
A best practice in modern software development that reduces risk, accelerates code delivery, and lowers your stress.
Safe continuous delivery
Gain the confidence to ship faster. In separating code deployments from feature releases, LaunchDarkly feature flags allow you to safely test new features in production before a formal software launch.
Instant rollbacks
Resolve incidents in real-time. Use React feature flags to turn off defective code with a single toggle. No engineers scrambling to put out fires, no emergency fixes, no restarting your entire app.
Progressive rollouts
Use React feature flags to roll out front-end and back-end features to a specific subset of users. As you gain confidence in the feature's performance, gradually roll it out to the broader userbase.
Collaborative software delivery
Empower business stakeholders to turn features on/off for users. Enhance the customer experience and save engineers time. Developers, deploy when you want. Let the business release later.
We've been able to roll out new features at a pace that would've been unheard of a couple of years ago.
Discover how to deploy code faster with less risk.