launchdarkly / react-client-sdk

LaunchDarkly Client-side SDK for React.js
Other
81 stars 67 forks source link

Unable to opt out of streaming #112

Closed anthony-dandrea closed 2 years ago

anthony-dandrea commented 2 years ago

Describe the bug Based on the docs here:

In the React SDK, streaming mode is enabled by default. To disable streaming mode, specify a streaming: false attribute in your options object.

I should be able to pass streaming: false in the options field to avoid rerendering upon new updates.

To reproduce Steps to reproduce the behavior.

Expected behavior I expect the option streaming: false to turn off live flag updates per JS SDK docs.

Logs N/A

SDK version 2.24.0

Language version, developer tools node v14.15.0, Chrome 97.0.4692.99

OS/platform macOS Monterey 12.1

Additional context Initial hunch makes me think we should be checking to see if streaming is enabled here before running subscribeToChanges.

anthony-dandrea commented 2 years ago

Our configuration was incorrect. Thanks for the lovely SDK 😃