Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
2c96e42 to
df5b8a6
Compare
|
@cursor review |
There was a problem hiding this comment.
Implementation changes starts here
8e0d270 to
9311409
Compare
| }); | ||
|
|
||
| await page.goto(url); | ||
| // Retry page.goto until the entity is ready (race-condition guard) |
There was a problem hiding this comment.
This makes me a smidge nervous.
There was a problem hiding this comment.
This is done in lieu of waiting for the browser ready in the the workflow
| * @deprecated Use `useLDClient` with the client's variation methods directly. This hook will be | ||
| * removed in a future major version. | ||
| */ | ||
| export function useFlags<T extends LDFlagSet = LDFlagSet>( |
There was a problem hiding this comment.
How does this work with Camelization?
There was a problem hiding this comment.
I will address Camelization in SDK-2014. Does this mean we will need to proxy client.allFlags to support this? Not sure if it makes much sense doing that anywhere else.
4730777 to
732bd27
Compare
Requirements
Related issues
sdk-1993
Note
Medium Risk
Introduces a new exported hook with Proxy-based evaluation behavior that can affect runtime performance and event emission semantics for consumers; changes are covered by targeted unit tests and are otherwise additive.
Overview
Adds a deprecated
useFlagshook to the React SDK, exposing all current flag values while wrapping them in a proxy that triggersclient.variationon each flag read (with per-key caching) so evaluation events are recorded, and re-creating the proxy on context/identity changes.Exports the new hook from
client/index.ts, adds Jest coverage for subscription/unsubscription, re-render behavior, deprecation warning logging, proxy caching semantics, and cache reset on context changes, and hardenscontract-tests/open-browser.mjsby retryingpage.gototo avoid startup race conditions.Written by Cursor Bugbot for commit 732bd27. This will update automatically on new commits. Configure here.