You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If local storage is enabled, launch darkly still servers the old value from local storage and updates it after the remote call is finished, hence user gets the old flag on first refresh, and is only able to get actual updated value after second refresh. And you can't ask user to refresh twice.
The text was updated successfully, but these errors were encountered:
Thanks for reaching out, and apologies for the delay in getting a response out on this issue. It sounds like you're bootstrapping the JavaScript SDK from localStorage, but would like to automatically update a user's flag settings, without refreshing the page. Is that right?
If so, I'd recommend subscribing to feature flag changes, and re-rendering your UI to reflect update feature flags whenever a change event does come through. Subscribing to flag changes to re-render your UI may look something like this:
ldclient.on('change:myFeature', function(value, previous) {
// logic to re-render myFeature with the new feature flag value
});
Does that sound like the behavior you were looking for? Given the age of this issue, I'll be closing it for now, but please don't hesitate to reply if you have any more questions 😄
If local storage is enabled, launch darkly still servers the old value from local storage and updates it after the remote call is finished, hence user gets the old flag on first refresh, and is only able to get actual updated value after second refresh. And you can't ask user to refresh twice.
The text was updated successfully, but these errors were encountered: