{"action":"created","issue":{"url":"https://api.github.com/repos/dockyard/ember-in-viewport/issues/7","labels_url":"https://api.github.com/repos/dockyard/ember-in-viewport/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/dockyard/ember-in-viewport/issues/7/comments","events_url":"https://api.github.com/repos/dockyard/ember-in-viewport/issues/7/events","html_url":"https://github.com/dockyard/ember-in-viewport/issues/7","id":70383345,"number":7,"title":"viewportEntered & viewportExited as \"real\" hooks","user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-23T11:18:34Z","updated_at":"2015-04-24T14:24:18Z","closed_at":null,"body":"The README uses the term \"hook\" to refer to boolean values that are set on the root of the component. IMHO, these are \"flags\" (or something) but a hook would be a function that is invoked.\r\n\r\nI would like to have functions that are called instead of forcing observation to consume the mixin. This would make it simpler to do complicated logic on entering/exiting the viewport without relying on using an observer.\r\n\r\nWe could use the following as a default implementation:\r\n\r\n```javascript\r\nviewportEntered() {\r\n  set(this, 'hasEnteredViewport', true);\r\n  this.trigger('viewportEntered'); // send the `viewportEntered` event\r\n}\r\n```\r\n\r\n---\r\n\r\nBackground: I am looking to swap ember-waypoints over to use ember-in-viewport instead of wrapping the jQuery plugin, and I would like to avoid having to use observation for triggering an action."},"comment":{"url":"https://api.github.com/repos/dockyard/ember-in-viewport/issues/comments/95947285","html_url":"https://github.com/dockyard/ember-in-viewport/issues/7#issuecomment-95947285","issue_url":"https://api.github.com/repos/dockyard/ember-in-viewport/issues/7","id":95947285,"user":{"login":"poteto","id":1390709,"avatar_url":"https://avatars.githubusercontent.com/u/1390709?v=3","gravatar_id":"","url":"https://api.github.com/users/poteto","html_url":"https://github.com/poteto","followers_url":"https://api.github.com/users/poteto/followers","following_url":"https://api.github.com/users/poteto/following{/other_user}","gists_url":"https://api.github.com/users/poteto/gists{/gist_id}","starred_url":"https://api.github.com/users/poteto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poteto/subscriptions","organizations_url":"https://api.github.com/users/poteto/orgs","repos_url":"https://api.github.com/users/poteto/repos","events_url":"https://api.github.com/users/poteto/events{/privacy}","received_events_url":"https://api.github.com/users/poteto/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T14:24:18Z","updated_at":"2015-04-24T14:24:18Z","body":"Working on it!"}}