{"action":"closed","issue":{"url":"https://api.github.com/repos/vuejs-templates/webpack-simple/issues/123","repository_url":"https://api.github.com/repos/vuejs-templates/webpack-simple","labels_url":"https://api.github.com/repos/vuejs-templates/webpack-simple/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/vuejs-templates/webpack-simple/issues/123/comments","events_url":"https://api.github.com/repos/vuejs-templates/webpack-simple/issues/123/events","html_url":"https://github.com/vuejs-templates/webpack-simple/issues/123","id":248013813,"number":123,"title":"beforeDestroy, destroyed triggers after created in hot reload","user":{"login":"Lacroute","id":3015073,"avatar_url":"https://avatars1.githubusercontent.com/u/3015073?v=4","gravatar_id":"","url":"https://api.github.com/users/Lacroute","html_url":"https://github.com/Lacroute","followers_url":"https://api.github.com/users/Lacroute/followers","following_url":"https://api.github.com/users/Lacroute/following{/other_user}","gists_url":"https://api.github.com/users/Lacroute/gists{/gist_id}","starred_url":"https://api.github.com/users/Lacroute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lacroute/subscriptions","organizations_url":"https://api.github.com/users/Lacroute/orgs","repos_url":"https://api.github.com/users/Lacroute/repos","events_url":"https://api.github.com/users/Lacroute/events{/privacy}","received_events_url":"https://api.github.com/users/Lacroute/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-04T13:56:19Z","updated_at":"2017-11-06T18:38:04Z","closed_at":"2017-11-06T18:38:03Z","author_association":"NONE","body":"Hi,\r\n\r\nI was experiencing some weird behavior with my fresh install of this template. The `created` hook  was triggered before the `beforeDestroy` and `destroyed`. But the real problem is `beforeDestroy` and `destroyed` wasn't triggered in the first hot reload at all.\r\nAlso, the `created` hook is triggered too soon.\r\n\r\nStep to reproduce:\r\n\r\n1. `vue init webpack-simple`\r\n2. edit the `App.vue` file\r\n```\r\n<script>\r\nexport default {\r\n  name: 'app',\r\n  data () {\r\n    return {\r\n      msg: 'Welcome to Your Vue.js App'\r\n    }\r\n  },\r\n  created () {\r\n    console.warn('created', Date.now())\r\n  },\r\n  mounted () {\r\n    console.warn('mounted', Date.now())\r\n  },\r\n  beforeDestroy () {\r\n    console.warn('beforeDestroy', Date.now())\r\n  },\r\n  destroyed () {\r\n    console.warn('destroyed', Date.now())\r\n  }\r\n}\r\n</script>\r\n```\r\n3. Re-edit to force hot reload\r\n4. compare\r\n\r\nScreen of my console:\r\n![capture d ecran 2017-08-04 a 15 48 21](https://user-images.githubusercontent.com/3015073/28971645-fbdc87f2-792c-11e7-8e41-fde6891475a0.png)\r\n"}}
{"actor":{"display_login":"LinusBorg"}}