{"push_id":735275200,"size":1,"distinct_size":1,"ref":"refs/heads/alt-resolver-state-sync-fix","head":"f88ecbb354df32885f53fa79e6c97c240bb26a84","before":"f46ac117fd7400ce3ee5ecfe935887c4d3a43411","commits":[{"sha":"f88ecbb354df32885f53fa79e6c97c240bb26a84","author":{"email":"7a2ef5a9f84cbe053caf6c0aedfa2700762fff1f@gmail.com","name":"Jack Chapple"},"message":"Fixed issue where Iso HTML & State would be out-of-sync\n\nThis took me a while to figure out! I hope the fix makes sense.\r\n\r\nIt should address a problem where the HTML and state that are passed to Iso would not match up, as the two are collected at ever so slightly different points in time.\r\n\r\nI had a component with an `inProgress` boolean as part of its state. This would of course change depending on when `onFetchStart` and `onFetchSuccess`/`onFetchFail` actions are dispatched. I could not understand why the Iso HTML markup reflected that `inProgress` was `false`, while the Iso state object reflected that `inProgress` was `true`. As it turns out it was due to the way `alt-renderer` uses `flux.flush()` *after* the second `React.renderToString`.\r\n\r\nMy thinking is that because all XHR promises will have been resolved on the first render, a snapshot of the Alt state can be taken after all promises have been resolved, and immediately before running the second `React.renderToString`.","distinct":true,"url":"https://api.github.com/repos/jchapple/isomorphic-flux-boilerplate/commits/f88ecbb354df32885f53fa79e6c97c240bb26a84"}]}