Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This topic explains the changes in the React Web SDK 3.0 release and how to adapt code that uses a 2.28 version of the React Web SDK to use version 3 or later. Version 3 includes several breaking changes. Additionally, if you use the Relay Proxy, you must update your Relay Proxy to version 7.0 before you update your SDK to version- To learn more, read the Relay Proxy 7.0 release notes. To upgrade to the latest Relay Proxy version, visit Relay Proxy releases on GitHub.
- You can update them at your own pace while still using 2.28, rather than migrating everything simultaneously. To learn more about updating to the latest 2.28 version, visit the SDK’s GitHub repository.
Identifying supported React versions and dependencies for the v3 SDK
The minimum React version for the LaunchDarkly React Web v3 SDK is 16.3.- If you want to use hooks, the minimum version is 16.
- LaunchDarkly no longer supports earlier React Web SDK versions, as stated in the End of Life policy.
Understanding changes to provider configuration
Version 3 of this SDK lets you use contexts. When you migrate from version 2.x, replace theuser provider configuration option with context. If you do not replace it, version 3 of the React Web SDK will look for the user configuration option as a fallback. This fallback may be removed in a future major release.
Here’s how with asyncWithLDProvider:
withLDProvider: