{"action":"created","issue":{"url":"https://api.github.com/repos/storybooks/storybook/issues/4972","repository_url":"https://api.github.com/repos/storybooks/storybook","labels_url":"https://api.github.com/repos/storybooks/storybook/issues/4972/labels{/name}","comments_url":"https://api.github.com/repos/storybooks/storybook/issues/4972/comments","events_url":"https://api.github.com/repos/storybooks/storybook/issues/4972/events","html_url":"https://github.com/storybooks/storybook/issues/4972","id":389704129,"node_id":"MDU6SXNzdWUzODk3MDQxMjk=","number":4972,"title":"shouldPersistSelection not working","user":{"login":"llccrr","id":15107671,"node_id":"MDQ6VXNlcjE1MTA3Njcx","avatar_url":"https://avatars0.githubusercontent.com/u/15107671?v=4","gravatar_id":"","url":"https://api.github.com/users/llccrr","html_url":"https://github.com/llccrr","followers_url":"https://api.github.com/users/llccrr/followers","following_url":"https://api.github.com/users/llccrr/following{/other_user}","gists_url":"https://api.github.com/users/llccrr/gists{/gist_id}","starred_url":"https://api.github.com/users/llccrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llccrr/subscriptions","organizations_url":"https://api.github.com/users/llccrr/orgs","repos_url":"https://api.github.com/users/llccrr/repos","events_url":"https://api.github.com/users/llccrr/events{/privacy}","received_events_url":"https://api.github.com/users/llccrr/received_events","type":"User","site_admin":false},"labels":[{"id":603502177,"node_id":"MDU6TGFiZWw2MDM1MDIxNzc=","url":"https://api.github.com/repos/storybooks/storybook/labels/app:%20react-native","name":"app: react-native","color":"f9d0c4","default":false},{"id":343576454,"node_id":"MDU6TGFiZWwzNDM1NzY0NTQ=","url":"https://api.github.com/repos/storybooks/storybook/labels/bug","name":"bug","color":"EB484F","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-11T10:52:32Z","updated_at":"2018-12-20T14:21:15Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nSetting shouldPersistSelection to `true` as above:\r\n`const StorybookUIRoot = getStorybookUI({ port: 7007, onDeviceUI: true, shouldPersistSelection: true });`\r\nBut it does not seem to work. \r\n\r\nI looked out the PR and figured out that it was supposed to write into the **Async Storage** with the `lastOpenedStory` key. \r\nI tried to console.log it in the render of my story but the value remains `null` and does not seem to be set at any time.\r\n\r\n**Expected behavior**\r\nRefreshing my device should initialize storybook with the last selected story\r\n\r\n**System:**\r\n - OS: MacOS\r\n - Device: [iPhoneX Emulator, Iphone 6 Emulator] (Xcode)\r\n - Framework: react-native\r\n - Addons: [addon-actions, addon-knobs, addon-links]\r\n - Version: @4.0.12\r\n\r\n**Additional context**\r\nMy stories does not have any other problem and are rendering perfectly. \r\n"},"comment":{"url":"https://api.github.com/repos/storybooks/storybook/issues/comments/449014491","html_url":"https://github.com/storybooks/storybook/issues/4972#issuecomment-449014491","issue_url":"https://api.github.com/repos/storybooks/storybook/issues/4972","id":449014491,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTAxNDQ5MQ==","user":{"login":"Gongreg","id":3867635,"node_id":"MDQ6VXNlcjM4Njc2MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3867635?v=4","gravatar_id":"","url":"https://api.github.com/users/Gongreg","html_url":"https://github.com/Gongreg","followers_url":"https://api.github.com/users/Gongreg/followers","following_url":"https://api.github.com/users/Gongreg/following{/other_user}","gists_url":"https://api.github.com/users/Gongreg/gists{/gist_id}","starred_url":"https://api.github.com/users/Gongreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gongreg/subscriptions","organizations_url":"https://api.github.com/users/Gongreg/orgs","repos_url":"https://api.github.com/users/Gongreg/repos","events_url":"https://api.github.com/users/Gongreg/events{/privacy}","received_events_url":"https://api.github.com/users/Gongreg/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T14:21:15Z","updated_at":"2018-12-20T14:21:15Z","author_association":"MEMBER","body":"Hey, @llccrr, I've just tested the functionality and it seems to work. Could you create a reproduction for this?"}}
{"actor":{"display_login":"Gongreg"}}