{"action":"created","issue":{"url":"https://api.github.com/repos/glenjamin/react-hotkey/issues/9","labels_url":"https://api.github.com/repos/glenjamin/react-hotkey/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/glenjamin/react-hotkey/issues/9/comments","events_url":"https://api.github.com/repos/glenjamin/react-hotkey/issues/9/events","html_url":"https://github.com/glenjamin/react-hotkey/issues/9","id":127532439,"number":9,"title":"hotkey.deactivate or similar?","user":{"login":"t1mmen","id":192263,"avatar_url":"https://avatars.githubusercontent.com/u/192263?v=3","gravatar_id":"","url":"https://api.github.com/users/t1mmen","html_url":"https://github.com/t1mmen","followers_url":"https://api.github.com/users/t1mmen/followers","following_url":"https://api.github.com/users/t1mmen/following{/other_user}","gists_url":"https://api.github.com/users/t1mmen/gists{/gist_id}","starred_url":"https://api.github.com/users/t1mmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t1mmen/subscriptions","organizations_url":"https://api.github.com/users/t1mmen/orgs","repos_url":"https://api.github.com/users/t1mmen/repos","events_url":"https://api.github.com/users/t1mmen/events{/privacy}","received_events_url":"https://api.github.com/users/t1mmen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-19T20:35:28Z","updated_at":"2016-01-20T06:19:35Z","closed_at":null,"body":"Hi,\r\n\r\nFirst off, thanks for a great mixin! I'm looking manual hooks similar to what `componentDidMount` and `componentWillUnmount` already do, allowing this sort of functionality:\r\n\r\n```js\r\n   componentWillReceiveProps(nextProps) {\r\n     if (nextProps.isHotkeyActive) {\r\n       hotkey.activate();\r\n     } else {\r\n       hotkey.deactivate(); // hotkey.disable unregisters all listeners :/\r\n     }\r\n   },\r\n```\r\n\r\nIs this something you're planning on adding support for? "},"comment":{"url":"https://api.github.com/repos/glenjamin/react-hotkey/issues/comments/173107445","html_url":"https://github.com/glenjamin/react-hotkey/issues/9#issuecomment-173107445","issue_url":"https://api.github.com/repos/glenjamin/react-hotkey/issues/9","id":173107445,"user":{"login":"t1mmen","id":192263,"avatar_url":"https://avatars.githubusercontent.com/u/192263?v=3","gravatar_id":"","url":"https://api.github.com/users/t1mmen","html_url":"https://github.com/t1mmen","followers_url":"https://api.github.com/users/t1mmen/followers","following_url":"https://api.github.com/users/t1mmen/following{/other_user}","gists_url":"https://api.github.com/users/t1mmen/gists{/gist_id}","starred_url":"https://api.github.com/users/t1mmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t1mmen/subscriptions","organizations_url":"https://api.github.com/users/t1mmen/orgs","repos_url":"https://api.github.com/users/t1mmen/repos","events_url":"https://api.github.com/users/t1mmen/events{/privacy}","received_events_url":"https://api.github.com/users/t1mmen/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T06:19:35Z","updated_at":"2016-01-20T06:19:35Z","body":"`hotkey.deactivate()` isn't a method, and `hotkey.disable()` unregisters all listeners for that event key, I was just trying to illustrate what I wanted to do.\r\n\r\nThanks though, I'll figure out a solution locally. Let me know if you change your mind re: core lib, and I'll submit a PR when I get around to fixing this issue."}}