{"action":"closed","issue":{"url":"https://api.github.com/repos/metal/metal.js/issues/106","repository_url":"https://api.github.com/repos/metal/metal.js","labels_url":"https://api.github.com/repos/metal/metal.js/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/metal/metal.js/issues/106/comments","events_url":"https://api.github.com/repos/metal/metal.js/issues/106/events","html_url":"https://github.com/metal/metal.js/issues/106","id":152839969,"number":106,"title":"Metal Lifecycle Method equivalent of componentWillReceiveProps()","user":{"login":"AngeloYoun","id":11049786,"avatar_url":"https://avatars.githubusercontent.com/u/11049786?v=3","gravatar_id":"","url":"https://api.github.com/users/AngeloYoun","html_url":"https://github.com/AngeloYoun","followers_url":"https://api.github.com/users/AngeloYoun/followers","following_url":"https://api.github.com/users/AngeloYoun/following{/other_user}","gists_url":"https://api.github.com/users/AngeloYoun/gists{/gist_id}","starred_url":"https://api.github.com/users/AngeloYoun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngeloYoun/subscriptions","organizations_url":"https://api.github.com/users/AngeloYoun/orgs","repos_url":"https://api.github.com/users/AngeloYoun/repos","events_url":"https://api.github.com/users/AngeloYoun/events{/privacy}","received_events_url":"https://api.github.com/users/AngeloYoun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-03T18:15:45Z","updated_at":"2016-05-09T14:35:48Z","closed_at":"2016-05-09T14:35:48Z","body":"We have a case where we want to be listening for a change when a config has been updated to a new value.\r\n\r\nIn React, the way this was done was through listening for any changes to props and then identifying if the prop being changed is different to the old.\r\n\r\n    componentWillReceiveProps(nextProps) {\r\n\t    if (JSON.stringify(this.props.foo) !== JSON.stringify(nextProps.foo)) {\r\n\t\t    this.changeAction();\r\n\t    }\r\n    }\r\n\r\nI am not convinced that this is the best way of doing this so any alternatives to including a lifecycle method would also be fine.\r\n\r\nThank you!\r\nAngelo Youn"}}