Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@dapperlabs/react-launch-darkly
Advanced tools
Convenience component for creating a Launch Darkly feature flags context.
Readme
Convenience component for creating a Launch Darkly feature flags context.
isReady
: boolean indicating connection to LD service has been established.clientSideId
: your launch darkly client idinitialFlags
: the set of flags to use on mount. Example: if you use SSR, you should fetch your initial flags from the API and set them here so that initial render has the correct values. These will get overwritten as necessary from the connection to LD when ready.user
: (optional) user object to define the user for fetching flags from launch darkly. If none is provided, will default to an anonymous user. See Launch Darkly documentation on user objectsImport the provider and wrap your application in it.
import { FeatureFlagsProvider } from '@dapperlabs/react-launch-darkly';
function Root() {
return (
<FeatureFlagsProvider
clientSideId={process.env.LAUNCH_DARKLY_CLIENT_SIDE_ID}
initialFlags={{ foo: 'bar' }}
user={{
key: user.id,
email: user.email,
}}
>
<MyDApp />
</FeatureFlagsProvider>
)
}
Context is directly available via import { FeatureFlagsContext } from '@dapperlabs/react-launch-darkly'
and can be consumed however you'd like:
useContext(FeatureFlagsContext)
👈IDEAL 😎static contextType = FeatureFlagsContext
<FeatureFlagsContext.Consumer />
Decorates your component with the above context values as a prop called featureFlags
.
FAQs
Convenience component for creating a Launch Darkly feature flags context.
The npm package @dapperlabs/react-launch-darkly receives a total of 5 weekly downloads. As such, @dapperlabs/react-launch-darkly popularity was classified as not popular.
We found that @dapperlabs/react-launch-darkly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.