{"action":"created","issue":{"url":"https://api.github.com/repos/launchdarkly/js-client/issues/72","repository_url":"https://api.github.com/repos/launchdarkly/js-client","labels_url":"https://api.github.com/repos/launchdarkly/js-client/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/launchdarkly/js-client/issues/72/comments","events_url":"https://api.github.com/repos/launchdarkly/js-client/issues/72/events","html_url":"https://github.com/launchdarkly/js-client/issues/72","id":304336581,"number":72,"title":"fetchFlagSettings doesnt update in memory flags or emit any events","user":{"login":"maxholman","id":250517,"avatar_url":"https://avatars3.githubusercontent.com/u/250517?v=4","gravatar_id":"","url":"https://api.github.com/users/maxholman","html_url":"https://github.com/maxholman","followers_url":"https://api.github.com/users/maxholman/followers","following_url":"https://api.github.com/users/maxholman/following{/other_user}","gists_url":"https://api.github.com/users/maxholman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxholman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxholman/subscriptions","organizations_url":"https://api.github.com/users/maxholman/orgs","repos_url":"https://api.github.com/users/maxholman/repos","events_url":"https://api.github.com/users/maxholman/events{/privacy}","received_events_url":"https://api.github.com/users/maxholman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-12T11:36:44Z","updated_at":"2018-03-12T15:09:31Z","closed_at":null,"author_association":"NONE","body":"If you are bootstrapping from localStorage, it is possible to have a situation where both localStorage and the in-memory flags are out of sync with the latest response that the client has received.\r\n\r\nThere is a [comment in the code](https://github.com/launchdarkly/js-client/blob/4fd7e8061fc963be60f034ae044866aee3eebe03/src/index.js#L324) that explains:\r\n\r\n```javascript\r\n// We won't signal changes or update the in-memory flags unless you subscribe for changes\r\n```\r\n\r\nBut, even if you do subscribe for changes as suggested, there is no code that fires off a `change` event.  Only localStorage is updated.\r\n\r\nIt's therefore not possible to react to these new/changed values until next refresh when the client reads from localStorage again and sees the new values.\r\n\r\nRelated: #59 "},"comment":{"url":"https://api.github.com/repos/launchdarkly/js-client/issues/comments/372343432","html_url":"https://github.com/launchdarkly/js-client/issues/72#issuecomment-372343432","issue_url":"https://api.github.com/repos/launchdarkly/js-client/issues/72","id":372343432,"user":{"login":"maxholman","id":250517,"avatar_url":"https://avatars3.githubusercontent.com/u/250517?v=4","gravatar_id":"","url":"https://api.github.com/users/maxholman","html_url":"https://github.com/maxholman","followers_url":"https://api.github.com/users/maxholman/followers","following_url":"https://api.github.com/users/maxholman/following{/other_user}","gists_url":"https://api.github.com/users/maxholman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxholman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxholman/subscriptions","organizations_url":"https://api.github.com/users/maxholman/orgs","repos_url":"https://api.github.com/users/maxholman/repos","events_url":"https://api.github.com/users/maxholman/events{/privacy}","received_events_url":"https://api.github.com/users/maxholman/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T15:09:31Z","updated_at":"2018-03-12T15:09:31Z","author_association":"NONE","body":"Looks like there are no `ping` events occuring on the stream until I make a change on launchdarkly.com - so the [`onPing`](https://github.com/launchdarkly/js-client/blob/4fd7e8061fc963be60f034ae044866aee3eebe03/src/Stream.js#L9) callback which is set via `stream.connect()` and updates the settings, doesnt fire when the stream connects."}}
{"actor":{"display_login":"maxholman"}}