{"action":"opened","issue":{"url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/1022","repository_url":"https://api.github.com/repos/mobxjs/mobx-state-tree","labels_url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/1022/comments","events_url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/1022/events","html_url":"https://github.com/mobxjs/mobx-state-tree/issues/1022","id":363194266,"node_id":"MDU6SXNzdWUzNjMxOTQyNjY=","number":1022,"title":"Hot to save and restore my states from localstorage with autosave?","user":{"login":"markolofsen","id":13606299,"node_id":"MDQ6VXNlcjEzNjA2Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/13606299?v=4","gravatar_id":"","url":"https://api.github.com/users/markolofsen","html_url":"https://github.com/markolofsen","followers_url":"https://api.github.com/users/markolofsen/followers","following_url":"https://api.github.com/users/markolofsen/following{/other_user}","gists_url":"https://api.github.com/users/markolofsen/gists{/gist_id}","starred_url":"https://api.github.com/users/markolofsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markolofsen/subscriptions","organizations_url":"https://api.github.com/users/markolofsen/orgs","repos_url":"https://api.github.com/users/markolofsen/repos","events_url":"https://api.github.com/users/markolofsen/events{/privacy}","received_events_url":"https://api.github.com/users/markolofsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-24T15:19:24Z","updated_at":"2018-09-24T15:19:24Z","closed_at":null,"author_association":"NONE","body":"Hot to save and restore my states from localstorage with autosave?\r\n[My repo for example](https://github.com/markolofsen/nextjs)\r\n\r\n```\r\nexport function initStore (isServer, snapshot = null) {\r\n  if (isServer) {\r\n    store = Store.create({ lastUpdate: Date.now() })\r\n  }\r\n  if (store === null) {\r\n    store = Store.create({ lastUpdate: Date.now() })\r\n  }\r\n\r\n  if (snapshot) {\r\n    applySnapshot(store, snapshot)\r\n  }\r\n\r\n  return store\r\n}\r\n```\r\n   \r\n"}}
{"actor":{"display_login":"markolofsen"}}