Identifying supported React versions and dependencies for the v3 SDK
The minimum React version for the LaunchDarkly React Web v3 SDK is 16.3.3. If you want to use hooks, the minimum version is 16.8. LaunchDarkly no longer supports earlier React Web SDK versions, as stated in the End of Life policy. The React Web SDK version 3.0.0 uses optional chaining. If you encounter an error related to optional chaining during transpiling, bundling, or running tests, updating to version 3.0.2 should resolve the error.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: