Questions tagged [launchdarkly]

LaunchDarkly is a SaaS feature management platform. This tag should be used on PROGRAMMING QUESTIONS related to the LaunchDarkly platform. NON-PROGRAMMING QUESTIONS ABOUT LAUNCHDARKLY ARE OFF-TOPIC.

LaunchDarkly is a feature management platform which can be used to control feature lifecycles. The platform has server-side, client-side and mobile SDKs, including .NET, PHP, Python, Node.js, Java, JavaScript, Ruby/Rails, Go, iOS, and Android.

LaunchDarkly can do canary launches, infrastructure migrations, test in production, and user entitlements.

49 questions
20
votes
4 answers

How to test a nestjs service by passing in a ConfigService with custom values?

I've created a service, and the module for it looks like this: launchdarkly.module.ts @Module({ providers: [LaunchdarklyService], exports: [LaunchdarklyService], imports: [ConfigService], }) export class LaunchdarklyModule {} (this…
Jon Lauridsen
  • 2,521
  • 5
  • 31
  • 38
6
votes
2 answers

How can I programmatically set the user details for Launch Darkly in my react app

I am wrapping my App.js file in the withLDProvider component and I want to know how I can set the user information from inside of my App function. Let's say for example I get the username that is cached in Dexie inside of my App function, how can I…
B.L.Coskey
  • 285
  • 2
  • 9
4
votes
0 answers

Configuring Jest to work with React-Native, Typescript and ES6 modules (Syntax Error: Cannot use import statement outside a module)

Context Our team just inherited a React-Native (not Expo), Typescript codebase without any tests for the TSX. We are currently trying to setup the first set of tests for some hooks, but are unable to run them. Other unit tests that do not involve…
Fluous
  • 2,075
  • 2
  • 17
  • 29
4
votes
1 answer

access props outside component hoc - launch darkly implementation

I'm trying to access the props outside of a HOC. I'm trying to set up launch darkly and I need the clientSideID to be dynamic based on settings. I can't seem to figure out what I'm doing wrong. The withLDProvider is a function that needs to wrap the…
tiffsaw
  • 83
  • 1
  • 6
3
votes
0 answers

How to use asyncWithLDProvider from Launch Darkly with Next app

Launch Darkly have an example(https://github.com/launchdarkly/react-client-sdk/blob/main/examples/async-provider/src/client/index.js) of how to use asyncWithLDProvider with a React project (as below) but I cannot figure out how to integrate this…
daniel blythe
  • 946
  • 2
  • 16
  • 44
3
votes
1 answer

How are users identified in LaunchDarkly?

I'm using LaunchDarkly for feature flag management and I don't know where to get the key of the current user. Here is an example from the LD documentation of their React SDK: import { withLDProvider } from 'launchdarkly-react-client-sdk'; export…
ganqqwerty
  • 1,894
  • 2
  • 23
  • 36
3
votes
1 answer

LaunchDarkly - How to add to IConfiguration - .NET 5.0

I've integrated LaucnhDarkly to my .NET 5 code using a FeatureFlagService class and using dependency injection like below. services.AddSingleton(sp => new FeatureFlagsService(configuration)); And in the…
2
votes
1 answer

Implement Launchdarkly with function in react without wrapping in Component

Currently I am following the guidelines provided by launchdarkly and as per documentation I used: import { asyncWithLDProvider } from 'launchdarkly-react-client-sdk'; (async () => { const LDProvider = await asyncWithLDProvider({ clientSideID:…
2
votes
1 answer

How to integrate multiple Launchdarkly projects into a single react app

Launchdarkly's react web docs has a simple example of how to get started using feature flags from a single project. import { asyncWithLDProvider } from 'launchdarkly-react-client-sdk'; (async () => { const LDProvider = await…
tscbpl
  • 21
  • 1
2
votes
1 answer

JSON Body for "AddUserTargets" Patch Request

I'm attempting to patch a feature flag via the API, adding an individual target to the flag following the documentation for patching feature flags. Targeting an API route of https://app.launchdarkly.com/api/v2/flags/foo/bar Where bar is a boolean…
JeffK3
  • 107
  • 7
2
votes
0 answers

How do I retrieve custom properties on a LaunchDarkly user?

I'm trying to add an attribute to a LaunchDarkly user, and retrieve it on subsequent reloads. Here's a simplified example: import { withLDProvider } from 'launchdarkly-react-client-sdk'; export default withLDProvider({ clientSideID:…
Evan Winter
  • 373
  • 2
  • 7
2
votes
0 answers

LaunchDarkly: Flushing data from client in offline mode

I'm working on a POC using LaunchDarkly's Java + Redis SDK and one of my requirements is initializing a 2nd LaunchDarkly client in "offline" mode. Due to my existing architecture one application will connect to LaunchDarkly and hydrate a Redis…
brcorrea
  • 51
  • 3
2
votes
2 answers

How to mock feature toggle without connection to Launch Darkly?

I have a new code line which has to be surrounded with a feature toggle. Since it is a service (Flask application) which initiates all its connections and relevant integration with external sources on the start-up - I have no instance of…
andreygold
  • 192
  • 2
  • 13
2
votes
1 answer

LaunchDarkly Bootstrapping: (JS) Property Assignment Expected

I am setting up LaunchDarkly to control my first feature flag and its working fine from server & client side. Now I am trying LaunchDarkly Bootstrap approach (From the below given Link) and tried like below my code, but it's not accepting the…
Md Aslam
  • 1,228
  • 8
  • 27
  • 61
1
vote
1 answer

LaunchDarkly React SDK - How Do I Disable Console Logs?

I am currently using the LaunchDarkly React SDK. I see the below on every page of my app: How do I disable these console logs?
Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248
1
2 3 4