{"action":"created","issue":{"url":"https://api.github.com/repos/mobxjs/mobx-react-lite/issues/28","repository_url":"https://api.github.com/repos/mobxjs/mobx-react-lite","labels_url":"https://api.github.com/repos/mobxjs/mobx-react-lite/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/mobxjs/mobx-react-lite/issues/28/comments","events_url":"https://api.github.com/repos/mobxjs/mobx-react-lite/issues/28/events","html_url":"https://github.com/mobxjs/mobx-react-lite/issues/28","id":382625847,"node_id":"MDU6SXNzdWUzODI2MjU4NDc=","number":28,"title":"Rename useObservableEffect to useDisposable","user":{"login":"FredyC","id":1096340,"node_id":"MDQ6VXNlcjEwOTYzNDA=","avatar_url":"https://avatars0.githubusercontent.com/u/1096340?v=4","gravatar_id":"","url":"https://api.github.com/users/FredyC","html_url":"https://github.com/FredyC","followers_url":"https://api.github.com/users/FredyC/followers","following_url":"https://api.github.com/users/FredyC/following{/other_user}","gists_url":"https://api.github.com/users/FredyC/gists{/gist_id}","starred_url":"https://api.github.com/users/FredyC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredyC/subscriptions","organizations_url":"https://api.github.com/users/FredyC/orgs","repos_url":"https://api.github.com/users/FredyC/repos","events_url":"https://api.github.com/users/FredyC/events{/privacy}","received_events_url":"https://api.github.com/users/FredyC/received_events","type":"User","site_admin":false},"labels":[{"id":1123773422,"node_id":"MDU6TGFiZWwxMTIzNzczNDIy","url":"https://api.github.com/repos/mobxjs/mobx-react-lite/labels/discussion","name":"discussion","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-20T11:44:19Z","updated_at":"2018-11-26T10:19:53Z","closed_at":"2018-11-26T10:19:53Z","author_association":"COLLABORATOR","body":"@xaviergonz I just realized that `useObservableEffect` might not be needed. The only benefit I see is that you get the disposer to the outer scope, but I am not sure about a single use case scenario where that could be useful (yet).\r\n\r\nThis will work exactly the same if I am not mistaken since reaction/autorun/when are all returning a function that will be called on unmount anyway. Having a memoized ref to that disposer is such a tiny bonus.\r\n\r\n```js\r\n   useEffect(() =>\r\n       reaction(\r\n           () => [props.firstName, props.lastName],\r\n           () => {\r\n               // send this to some server\r\n           }\r\n       )\r\n   , [])\r\n```\r\n\r\nIt's not like it's completely useless, but feels like it might confuse users that there is some other benefit to it. Correct me, if I am wrong, please."},"comment":{"url":"https://api.github.com/repos/mobxjs/mobx-react-lite/issues/comments/441588167","html_url":"https://github.com/mobxjs/mobx-react-lite/issues/28#issuecomment-441588167","issue_url":"https://api.github.com/repos/mobxjs/mobx-react-lite/issues/28","id":441588167,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTU4ODE2Nw==","user":{"login":"FredyC","id":1096340,"node_id":"MDQ6VXNlcjEwOTYzNDA=","avatar_url":"https://avatars0.githubusercontent.com/u/1096340?v=4","gravatar_id":"","url":"https://api.github.com/users/FredyC","html_url":"https://github.com/FredyC","followers_url":"https://api.github.com/users/FredyC/followers","following_url":"https://api.github.com/users/FredyC/following{/other_user}","gists_url":"https://api.github.com/users/FredyC/gists{/gist_id}","starred_url":"https://api.github.com/users/FredyC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredyC/subscriptions","organizations_url":"https://api.github.com/users/FredyC/orgs","repos_url":"https://api.github.com/users/FredyC/repos","events_url":"https://api.github.com/users/FredyC/events{/privacy}","received_events_url":"https://api.github.com/users/FredyC/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T10:19:53Z","updated_at":"2018-11-26T10:19:53Z","author_association":"COLLABORATOR","body":"Well, since I essentially needed that last example I just went and did rename it and released in 0.3.3. The `useObservableEffect` is still there, just using `useDisposable` underneath."}}
{"actor":{"display_login":"FredyC"}}