{"action":"created","issue":{"url":"https://api.github.com/repos/mobxjs/mobx/issues/479","repository_url":"https://api.github.com/repos/mobxjs/mobx","labels_url":"https://api.github.com/repos/mobxjs/mobx/issues/479/labels{/name}","comments_url":"https://api.github.com/repos/mobxjs/mobx/issues/479/comments","events_url":"https://api.github.com/repos/mobxjs/mobx/issues/479/events","html_url":"https://github.com/mobxjs/mobx/issues/479","id":170738865,"number":479,"title":"Doesn't observe constructed objects","user":{"login":"gaui","id":477881,"avatar_url":"https://avatars.githubusercontent.com/u/477881?v=3","gravatar_id":"","url":"https://api.github.com/users/gaui","html_url":"https://github.com/gaui","followers_url":"https://api.github.com/users/gaui/followers","following_url":"https://api.github.com/users/gaui/following{/other_user}","gists_url":"https://api.github.com/users/gaui/gists{/gist_id}","starred_url":"https://api.github.com/users/gaui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaui/subscriptions","organizations_url":"https://api.github.com/users/gaui/orgs","repos_url":"https://api.github.com/users/gaui/repos","events_url":"https://api.github.com/users/gaui/events{/privacy}","received_events_url":"https://api.github.com/users/gaui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-11T20:31:05Z","updated_at":"2016-08-11T21:19:32Z","closed_at":null,"body":"When creating an observable array and pushing constructed objects (objects created with constructor functions) to it, `autorun` runs. However when I change values on props on those objects, `autorun` doesn't run. It's like the object is no longer observed.\r\n\r\nHere's a JSbin with examples. Examples 1,2 and 3 all work (created with object literals). However, 4 and 5 don't (constructor function method). I'm wondering if there is an explanation why this doesn't work?\r\n\r\nhttp://jsbin.com/dofunutone/edit?html,js,console"},"comment":{"url":"https://api.github.com/repos/mobxjs/mobx/issues/comments/239296059","html_url":"https://github.com/mobxjs/mobx/issues/479#issuecomment-239296059","issue_url":"https://api.github.com/repos/mobxjs/mobx/issues/479","id":239296059,"user":{"login":"mattruby","id":142194,"avatar_url":"https://avatars.githubusercontent.com/u/142194?v=3","gravatar_id":"","url":"https://api.github.com/users/mattruby","html_url":"https://github.com/mattruby","followers_url":"https://api.github.com/users/mattruby/followers","following_url":"https://api.github.com/users/mattruby/following{/other_user}","gists_url":"https://api.github.com/users/mattruby/gists{/gist_id}","starred_url":"https://api.github.com/users/mattruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattruby/subscriptions","organizations_url":"https://api.github.com/users/mattruby/orgs","repos_url":"https://api.github.com/users/mattruby/repos","events_url":"https://api.github.com/users/mattruby/events{/privacy}","received_events_url":"https://api.github.com/users/mattruby/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T21:19:32Z","updated_at":"2016-08-11T21:19:32Z","body":"For literals: try mobx.observable(whatever)\nCheck out my mobx examples for more help\nhttps://github.com/mattruby/mobx-examples\n\nOn Aug 11, 2016 3:45 PM, \"Gudjon\" <notifications@github.com> wrote:\n\n> @mattruby <https://github.com/mattruby> Thank you. Does MobX\n> automatically make props observable in object literals? Why not also for\n> object constructs?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/mobxjs/mobx/issues/479#issuecomment-239286751>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAIrcmIFLl7UX5OgT8Dd2MreV2TXlYsYks5qe4nugaJpZM4JihKq>\n> .\n>\n"}}
{"actor":{"display_login":"mattruby"}}