{"action":"created","issue":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1071","repository_url":"https://api.github.com/repos/nuxt/nuxt.js","labels_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1071/labels{/name}","comments_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1071/comments","events_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1071/events","html_url":"https://github.com/nuxt/nuxt.js/issues/1071","id":242117056,"node_id":"MDU6SXNzdWUyNDIxMTcwNTY=","number":1071,"title":"Fetch Data after navigation","user":{"login":"KonstantinVlasov","id":2950641,"node_id":"MDQ6VXNlcjI5NTA2NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2950641?v=4","gravatar_id":"","url":"https://api.github.com/users/KonstantinVlasov","html_url":"https://github.com/KonstantinVlasov","followers_url":"https://api.github.com/users/KonstantinVlasov/followers","following_url":"https://api.github.com/users/KonstantinVlasov/following{/other_user}","gists_url":"https://api.github.com/users/KonstantinVlasov/gists{/gist_id}","starred_url":"https://api.github.com/users/KonstantinVlasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KonstantinVlasov/subscriptions","organizations_url":"https://api.github.com/users/KonstantinVlasov/orgs","repos_url":"https://api.github.com/users/KonstantinVlasov/repos","events_url":"https://api.github.com/users/KonstantinVlasov/events{/privacy}","received_events_url":"https://api.github.com/users/KonstantinVlasov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-11T17:00:10Z","updated_at":"2018-06-25T16:42:45Z","closed_at":"2017-07-12T10:08:42Z","author_association":"NONE","body":"Hello, guys!\r\n\r\nAs mentioned in the docs, `asyncData` calls before loading the component and this is what we expect for SSR. But for better UX I want to fetch data after navigation for client-side navigation.\r\n\r\nIs there a simple way to fetch data before component loading for server-side and after component loading for client-side?\r\nIs anyone faced with this problem?\r\n\r\nSorry if it's duplicate, can't find anything similar\n\n<!--cmty--><!--cmty_prevent_hook-->\n<div align=\"right\"><sub><em>This question is available on <a href=\"https://nuxtjs.cmty.io\">Nuxt.js</a> community (<a href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c933\">#c933</a>)</em></sub></div>"},"comment":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/comments/400017782","html_url":"https://github.com/nuxt/nuxt.js/issues/1071#issuecomment-400017782","issue_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1071","id":400017782,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDAxNzc4Mg==","user":{"login":"adrianoresende","id":798755,"node_id":"MDQ6VXNlcjc5ODc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/798755?v=4","gravatar_id":"","url":"https://api.github.com/users/adrianoresende","html_url":"https://github.com/adrianoresende","followers_url":"https://api.github.com/users/adrianoresende/followers","following_url":"https://api.github.com/users/adrianoresende/following{/other_user}","gists_url":"https://api.github.com/users/adrianoresende/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianoresende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianoresende/subscriptions","organizations_url":"https://api.github.com/users/adrianoresende/orgs","repos_url":"https://api.github.com/users/adrianoresende/repos","events_url":"https://api.github.com/users/adrianoresende/events{/privacy}","received_events_url":"https://api.github.com/users/adrianoresende/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T16:42:45Z","updated_at":"2018-06-25T16:42:45Z","author_association":"NONE","body":"Is this code a good way?\r\nIf you need run code after 100% loaded with **image** and **files**, check code in `mounted()`:\r\n\r\n    document.onreadystatechange = () => {\r\n      if (document.readyState == \"complete\") {\r\n        console.log('Page completed with image and files!')\r\n        // fetch\r\n      }\r\n    }\r\n\r\nMore info: [MDN Api onreadystatechange][1]\r\n\r\n\r\n  [1]: https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/onreadystatechange"}}
{"actor":{"display_login":"adrianoresende"}}