launchdarkly-react-client-sdk
Advanced tools
Changelog
[2.29.1] - 2022-10-21
js-client-sdk
version 2.24.2
which includes implementations of jitter
and backoff
for streaming connections. When a connection fails the retry will start at the streamReconnectDelay
and will double on each unsuccessful consecutive connection attempt (backoff
) to a max of 30 seconds. The delay will be adjusted from 50%-100% of the calculated delay to prevent many clients from attempting to reconnect at the same time (jitter
).Changelog
[2.29.0] - 2022-10-18
js-client-sdk
to 2.24.0
which added support for Inspectors
that can be used for collecting information for monitoring, analytics, and debugging.Changelog
[2.28.0] - 2022-10-05
js-client-sdk
version which removed event de-duplication functionality which was made redundant by support of summary events. This will improve the default event behavior when using experimentation.Changelog
[2.27.0] - 2022-08-31
useFlags
hook is now generically typed, allowing you to assert what type your flag set will be.useLDClientError
hook for exposing client initialization failures.sendEventsOnlyForVariation
is now set to true
by default to prevent a flag evaluation event being generated for every flag on load.flags
object (that is either injected via props using LDConsumer
or returned from the useFlags
hook) will generate a flag evaluation event on flag read (using a JavaScript proxy). This can be disabled by setting reactOptions.sendEventsOnFlagRead: false
.Changelog
[2.26.0] - 2022-04-27
LDOptions.application
, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.basicLogger
, a replacement for the deprecated createConsoleLogger
.baseUrl
, streamUrl
, and eventsUrl
properties now work properly regardless of whether the URL string has a trailing slash. Previously, a trailing slash would cause request URL paths to have double slashes.Changelog
[2.25.1] - 2022-02-18
error
event or, if there are no error
event listeners, it is logged. Previously, the error would be thrown as an unhandled exception.Changelog
[2.25.0] - 2022-02-08
Updated to version 2.20.1 of the JavaScript SDK, incorporating improvements from the 2.19.4, 2.20.0, and 2.20.1 releases.
LDReactOptions
, ProviderConfig
, AsyncProviderConfig
, and AllFlagsLDClient
. These were referenced in exported functions, but were not previously importable from the main module.LDOptions.requestHeaderTransform
allows custom headers to be added to all HTTP requests. This may be necessary if you have an Internet gateway that uses a custom header for authentication. Note that custom headers may cause cross-origin browser requests to be rejected unless you have a way to ensure that the header name also appears in Access-Control-Allow-Headers
for CORS preflight responses; if you are connecting to the LaunchDarkly Relay Proxy, it has a way to configure this.track
: Custom event "_____" does not exist
. Originally, the SDK had an expectation that track
would be used only for event keys that had been previously defined as custom goals in the LaunchDarkly dashboard. That is still often the case, but it is not required and LaunchDarkly no longer sends custom goal names to the SDK, so the warning was happening even if such a goal did exist.Changelog
[2.24.0] - 2021-12-09
ldClient
instance (thanks, TimboTambo!)AsyncProviderConfig
.Changelog
[2.23.3] - 2021-11-02
AsyncProviderConfig
type was added. This type is a clone of ProviderConfig
except that deferInitialization
is marked as deprecated; see the "Deprecated" section below for more information.deferInitialization
in the config
object parameter for asyncWithLDProvider
. The asyncWithLDProvider
function needs to be initialized at the app entry point prior to render to ensure flags and the ldClient
are ready at the beginning of the app. As a result, initialization cannot be deferred when using asyncWithLDProvider
. (#99)