{"action":"opened","issue":{"url":"https://api.github.com/repos/mweststrate/mobservable-react/issues/22","labels_url":"https://api.github.com/repos/mweststrate/mobservable-react/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/mweststrate/mobservable-react/issues/22/comments","events_url":"https://api.github.com/repos/mweststrate/mobservable-react/issues/22/events","html_url":"https://github.com/mweststrate/mobservable-react/issues/22","id":129707634,"number":22,"title":"debugging aids?","user":{"login":"Kosta-Github","id":2526664,"avatar_url":"https://avatars.githubusercontent.com/u/2526664?v=3","gravatar_id":"","url":"https://api.github.com/users/Kosta-Github","html_url":"https://github.com/Kosta-Github","followers_url":"https://api.github.com/users/Kosta-Github/followers","following_url":"https://api.github.com/users/Kosta-Github/following{/other_user}","gists_url":"https://api.github.com/users/Kosta-Github/gists{/gist_id}","starred_url":"https://api.github.com/users/Kosta-Github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kosta-Github/subscriptions","organizations_url":"https://api.github.com/users/Kosta-Github/orgs","repos_url":"https://api.github.com/users/Kosta-Github/repos","events_url":"https://api.github.com/users/Kosta-Github/events{/privacy}","received_events_url":"https://api.github.com/users/Kosta-Github/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-29T09:01:33Z","updated_at":"2016-01-29T09:01:33Z","closed_at":null,"body":"Are there some more debugging aids available hidden somewhere inside the code?\r\n\r\nI would like to track down, why a `react` component doesn't get updated automatically although it displays an observable value. How would I track down the issue best?\r\n\r\nI haven't managed to get a down-stripped version of my issue yet. The following is a small example that is very similar to my case, but this is working as expected:\r\n```JavaScript\r\nimport React from 'react';\r\nimport mobs  from 'mobservable';\r\nimport mobsr from 'mobservable-react';\r\nrequire(\"mobservable-react-devtools\");\r\n\r\nconst tree = mobs.observable(\r\n    { name: 'root_name', data: 1, collapsed: false, children: [\r\n        { name: 'child_1', data: 2 },\r\n        { name: 'child_2', data: 3, collapsed: false, children: [\r\n            { name: 'child_2_1', data: 4 }\r\n        ] }\r\n    ] }\r\n);\r\n\r\nconst TreeComponent = mobsr.observer(({ tree }) => {\r\n    const hasChildren  = tree.children && tree.children.length;\r\n    const openClose    = hasChildren ? <span>{tree.collapsed ? '[OPEN] ' : '[CLOSE] '}</span> : null;\r\n    const showChildren = hasChildren && !tree.collapsed;\r\n    return <div>\r\n        <li><span>{openClose}{tree.name}: {tree.data}</span></li>\r\n        {showChildren && <ul>{tree.children.map((c, idx) => <TreeComponent key={idx} tree={c} />)}</ul>}\r\n    </div>;\r\n});\r\n\r\nReactDOM.render(\r\n    <ul><TreeComponent tree={tree} /></ul>,\r\n    document.getElementById('app_id')\r\n);\r\n\r\nsetInterval(() => { tree.children[0].data = Math.random(); }, 3000);\r\nsetInterval(() => { tree.children[1].name = Math.random(); }, 4500);\r\nsetInterval(() => { tree.collapsed = !tree.collapsed; }, 7000);\r\nsetInterval(() => { tree.children[1].collapsed = !tree.children[1].collapsed; }, 4000);\r\n```\r\nMy case is very similar, except that it doesn't react to changes of `collapsed` automatically. I need to add the following `propTypes` definition to make it actually working:\r\n```JavaScript\r\nTreeComponent.propTypes = {\r\n    tree: React.PropTypes.shape({\r\n        collapsed: React.PropTypes.bool\r\n    })\r\n}\r\n```\r\nThe bad thing about that is, it stops working again, when switching to `production` mode, since then `react` ignores the `propTypes` definitions.\r\n\r\nHow would/could I track down the issue best?"}}