launchdarkly / react-client-sdk

LaunchDarkly Client-side SDK for React.js
Other
86 stars 68 forks source link

Expose ld provider #40

Closed bezreyhan closed 4 years ago

bezreyhan commented 4 years ago

Related issues https://github.com/launchdarkly/react-client-sdk/pull/39 https://github.com/launchdarkly/react-client-sdk/pull/31

I've described the issue in detail in this PR: https://github.com/launchdarkly/react-client-sdk/pull/39

Describe the solution you've provided My PR is a fork of https://github.com/launchdarkly/react-client-sdk/pull/31, but it also allows the ldClient to only be initialized once the user object has been defined. I've added a prop to LDProvider called waitForUserToInitializeClient. If this flag is set to true, then the LDClient won't be initialized until a the user prop has been defined.

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered Here is another PR I've proposed: https://github.com/launchdarkly/react-client-sdk/pull/39

bwoskow-ld commented 4 years ago

Hi @bezreyhan ,

I merged #31 just now -- please pull in the latest from launchdarkly:contrib to get those changes. The changes aren't yet on master as the changes aren't yet publicly available in any release.

We'll review this PR next week and if all goes well can include this in the next React SDK release along with #31.

Cheers, Ben

bezreyhan commented 4 years ago

Hi @bwoskow-ld - I just updated my PR. Thanks for helping to push this along!

bezreyhan commented 4 years ago

Hi @bwoskow-ld, I just wanted to check on the status of this. Is there anything I can do to help?

bwoskow-ld commented 4 years ago

Sorry for the delay -- I've asked one of my teammates to look at it this week. Stay tuned.

bezreyhan commented 4 years ago

@yusinto Thanks for taking a look at my changes. Please let me know if anything else is needed.

bezreyhan commented 4 years ago

@yusinto @bwoskow-ld thanks for looking at the PR. It's been a couple of weeks so I wanted to checkin and see if there is anything else that needs to be done. We would really benefit from this PR since our MAUs are about 1000% over our allowed amount and it's preventing us from using LD to it's full capacity.

I'm happy to make any other changes if needed. Please let me know. Thanks.