{"action":"created","issue":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/919","repository_url":"https://api.github.com/repos/skatejs/skatejs","labels_url":"https://api.github.com/repos/skatejs/skatejs/issues/919/labels{/name}","comments_url":"https://api.github.com/repos/skatejs/skatejs/issues/919/comments","events_url":"https://api.github.com/repos/skatejs/skatejs/issues/919/events","html_url":"https://github.com/skatejs/skatejs/issues/919","id":189690007,"number":919,"title":"\"static get props\" should be called only once per class ","user":{"login":"andreawyss","id":4635265,"avatar_url":"https://avatars.githubusercontent.com/u/4635265?v=3","gravatar_id":"","url":"https://api.github.com/users/andreawyss","html_url":"https://github.com/andreawyss","followers_url":"https://api.github.com/users/andreawyss/followers","following_url":"https://api.github.com/users/andreawyss/following{/other_user}","gists_url":"https://api.github.com/users/andreawyss/gists{/gist_id}","starred_url":"https://api.github.com/users/andreawyss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreawyss/subscriptions","organizations_url":"https://api.github.com/users/andreawyss/orgs","repos_url":"https://api.github.com/users/andreawyss/repos","events_url":"https://api.github.com/users/andreawyss/events{/privacy}","received_events_url":"https://api.github.com/users/andreawyss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-16T12:32:27Z","updated_at":"2016-11-24T02:08:22Z","closed_at":null,"body":"static get props returns props definitions that are constructed using Prop.create()\r\nstatic get props is accessed multiple times during component livecycle.\r\nEach time static get props is accessed a new set of props definitions get reconstructed!\r\n\r\nTo solve this issue, create a static getPropDefs() that caches the props definitions for a given class and then refactor the code to use static getPropDefs() instead of directly accessing static get props.\r\n\r\nimplementation would be something like this:\r\n\r\nstatic getPropDefs() {\r\n    if (!this.hasOwnProperty('_propDefs') ) {\r\n        this._propDefs = this.props;\r\n    }\r\n    return this._propDefs;\r\n}\r\n\r\nNote: getPropDefs is static therefore \"this\" refers to the Constructor and this.props if not found on the current constructor will be looked up in an ancestor Constructor that the component is extending.\r\n"},"comment":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/comments/262674018","html_url":"https://github.com/skatejs/skatejs/issues/919#issuecomment-262674018","issue_url":"https://api.github.com/repos/skatejs/skatejs/issues/919","id":262674018,"user":{"login":"andreawyss","id":4635265,"avatar_url":"https://avatars.githubusercontent.com/u/4635265?v=3","gravatar_id":"","url":"https://api.github.com/users/andreawyss","html_url":"https://github.com/andreawyss","followers_url":"https://api.github.com/users/andreawyss/followers","following_url":"https://api.github.com/users/andreawyss/following{/other_user}","gists_url":"https://api.github.com/users/andreawyss/gists{/gist_id}","starred_url":"https://api.github.com/users/andreawyss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreawyss/subscriptions","organizations_url":"https://api.github.com/users/andreawyss/orgs","repos_url":"https://api.github.com/users/andreawyss/repos","events_url":"https://api.github.com/users/andreawyss/events{/privacy}","received_events_url":"https://api.github.com/users/andreawyss/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T02:08:22Z","updated_at":"2016-11-24T02:08:22Z","body":"This will be solved once PR #932 will be approved and merged."}}
{"actor":{"display_login":"andreawyss"}}