{"action":"created","issue":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/663","repository_url":"https://api.github.com/repos/redux-saga/redux-saga","labels_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/663/labels{/name}","comments_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/663/comments","events_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/663/events","html_url":"https://github.com/redux-saga/redux-saga/issues/663","id":192505355,"number":663,"title":"Preventing container rendering until data is resolved","user":{"login":"mmahalwy","id":3749095,"avatar_url":"https://avatars.githubusercontent.com/u/3749095?v=3","gravatar_id":"","url":"https://api.github.com/users/mmahalwy","html_url":"https://github.com/mmahalwy","followers_url":"https://api.github.com/users/mmahalwy/followers","following_url":"https://api.github.com/users/mmahalwy/following{/other_user}","gists_url":"https://api.github.com/users/mmahalwy/gists{/gist_id}","starred_url":"https://api.github.com/users/mmahalwy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmahalwy/subscriptions","organizations_url":"https://api.github.com/users/mmahalwy/orgs","repos_url":"https://api.github.com/users/mmahalwy/repos","events_url":"https://api.github.com/users/mmahalwy/events{/privacy}","received_events_url":"https://api.github.com/users/mmahalwy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-30T08:36:35Z","updated_at":"2017-02-15T21:39:46Z","closed_at":"2017-02-15T21:39:46Z","body":"Please excuse me if this has been previously answered. How can I prevent react-router from rendering a container until sagas for that container (data fetching) is resolved? And what does that look like? Any examples? \r\n\r\nThanks  "},"comment":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/comments/280148012","html_url":"https://github.com/redux-saga/redux-saga/issues/663#issuecomment-280148012","issue_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/663","id":280148012,"user":{"login":"Andarist","id":9800850,"avatar_url":"https://avatars.githubusercontent.com/u/9800850?v=3","gravatar_id":"","url":"https://api.github.com/users/Andarist","html_url":"https://github.com/Andarist","followers_url":"https://api.github.com/users/Andarist/followers","following_url":"https://api.github.com/users/Andarist/following{/other_user}","gists_url":"https://api.github.com/users/Andarist/gists{/gist_id}","starred_url":"https://api.github.com/users/Andarist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andarist/subscriptions","organizations_url":"https://api.github.com/users/Andarist/orgs","repos_url":"https://api.github.com/users/Andarist/repos","events_url":"https://api.github.com/users/Andarist/events{/privacy}","received_events_url":"https://api.github.com/users/Andarist/received_events","type":"User","site_admin":false},"created_at":"2017-02-15T21:39:46Z","updated_at":"2017-02-15T21:39:46Z","body":"With server side rendering you need to dispatch actions (lets call them - fetch commands) so they can be catched in your sagas. Make the saga tree block on every `call` etc and dispatch special action `END` which is exposed by the library. It will cause your sagas which are being blocked `take`s to resolve and your root task will be able to resolve in that way\r\n```javascript\r\nconst task = sagaMiddleware.run(rootSaga)\r\ntask.then(() => ...)\r\n```\r\nand then in your callback upon task completion send the server side rendered stuff back to your client.\r\n\r\nThere are several issues spread up on issues with examples, you can browser around and dig them up. Its certainly something that could be explained better in the docs though.\r\n\r\nGoing to close this, if you have any further questions - please just ask :)"}}
{"actor":{"display_login":"Andarist"}}