{"action":"created","issue":{"url":"https://api.github.com/repos/vikeri/react-native-background-job/issues/120","repository_url":"https://api.github.com/repos/vikeri/react-native-background-job","labels_url":"https://api.github.com/repos/vikeri/react-native-background-job/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/vikeri/react-native-background-job/issues/120/comments","events_url":"https://api.github.com/repos/vikeri/react-native-background-job/issues/120/events","html_url":"https://github.com/vikeri/react-native-background-job/issues/120","id":388641638,"node_id":"MDU6SXNzdWUzODg2NDE2Mzg=","number":120,"title":"redux-persist implementation?","user":{"login":"IgorMitev","id":21057931,"node_id":"MDQ6VXNlcjIxMDU3OTMx","avatar_url":"https://avatars0.githubusercontent.com/u/21057931?v=4","gravatar_id":"","url":"https://api.github.com/users/IgorMitev","html_url":"https://github.com/IgorMitev","followers_url":"https://api.github.com/users/IgorMitev/followers","following_url":"https://api.github.com/users/IgorMitev/following{/other_user}","gists_url":"https://api.github.com/users/IgorMitev/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMitev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMitev/subscriptions","organizations_url":"https://api.github.com/users/IgorMitev/orgs","repos_url":"https://api.github.com/users/IgorMitev/repos","events_url":"https://api.github.com/users/IgorMitev/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMitev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-07T12:48:30Z","updated_at":"2018-12-13T15:04:22Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nCan anybody please share their experience with implementing the package in correlation with redux-persist?\r\n\r\nThe background job is running just fine, but the store changes done while the app is killed are later not persisted to the store. Using AsyncStorage to track the changes is ok but not ideal.\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/vikeri/react-native-background-job/issues/comments/447000324","html_url":"https://github.com/vikeri/react-native-background-job/issues/120#issuecomment-447000324","issue_url":"https://api.github.com/repos/vikeri/react-native-background-job/issues/120","id":447000324,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzAwMDMyNA==","user":{"login":"daper","id":5327718,"node_id":"MDQ6VXNlcjUzMjc3MTg=","avatar_url":"https://avatars3.githubusercontent.com/u/5327718?v=4","gravatar_id":"","url":"https://api.github.com/users/daper","html_url":"https://github.com/daper","followers_url":"https://api.github.com/users/daper/followers","following_url":"https://api.github.com/users/daper/following{/other_user}","gists_url":"https://api.github.com/users/daper/gists{/gist_id}","starred_url":"https://api.github.com/users/daper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daper/subscriptions","organizations_url":"https://api.github.com/users/daper/orgs","repos_url":"https://api.github.com/users/daper/repos","events_url":"https://api.github.com/users/daper/events{/privacy}","received_events_url":"https://api.github.com/users/daper/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T15:04:22Z","updated_at":"2018-12-13T15:04:22Z","author_association":"NONE","body":"Hi,\r\n\r\nThis is what I'm planning to try.\r\n\r\n```\r\nconstructor () {\r\n  let { store, persistor } = configureStore()\r\n  this.store = store\r\n  this.persistor = persistor\r\n  this.state = store.getState()\r\n}\r\n\r\nfetchState () {\r\n  return new Promise((resolve, reject) => {\r\n    let unsubscribe = this.store.subscribe(() => {\r\n      const { app } = this.store.getState()\r\n      unsubscribe()\r\n\r\n      this.state = app\r\n      resolve(app)\r\n    })\r\n  })\r\n}\r\n\r\n// Some modifications in the middle\r\n\r\nawait this.persistor.persist()\r\n```\r\n\r\nStill unclear how to notify the main thread that should rehydrate its state..."}}
{"actor":{"display_login":"daper"}}