{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/componentkit/issues/114","labels_url":"https://api.github.com/repos/facebook/componentkit/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/facebook/componentkit/issues/114/comments","events_url":"https://api.github.com/repos/facebook/componentkit/issues/114/events","html_url":"https://github.com/facebook/componentkit/issues/114","id":68266535,"number":114,"title":"Question: The best practices to update the model of collection cell","user":{"login":"smalllixin","id":787881,"avatar_url":"https://avatars.githubusercontent.com/u/787881?v=3","gravatar_id":"","url":"https://api.github.com/users/smalllixin","html_url":"https://github.com/smalllixin","followers_url":"https://api.github.com/users/smalllixin/followers","following_url":"https://api.github.com/users/smalllixin/following{/other_user}","gists_url":"https://api.github.com/users/smalllixin/gists{/gist_id}","starred_url":"https://api.github.com/users/smalllixin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalllixin/subscriptions","organizations_url":"https://api.github.com/users/smalllixin/orgs","repos_url":"https://api.github.com/users/smalllixin/repos","events_url":"https://api.github.com/users/smalllixin/events{/privacy}","received_events_url":"https://api.github.com/users/smalllixin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"benlodotcom","id":313959,"avatar_url":"https://avatars.githubusercontent.com/u/313959?v=3","gravatar_id":"","url":"https://api.github.com/users/benlodotcom","html_url":"https://github.com/benlodotcom","followers_url":"https://api.github.com/users/benlodotcom/followers","following_url":"https://api.github.com/users/benlodotcom/following{/other_user}","gists_url":"https://api.github.com/users/benlodotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/benlodotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlodotcom/subscriptions","organizations_url":"https://api.github.com/users/benlodotcom/orgs","repos_url":"https://api.github.com/users/benlodotcom/repos","events_url":"https://api.github.com/users/benlodotcom/events{/privacy}","received_events_url":"https://api.github.com/users/benlodotcom/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-14T05:30:29Z","updated_at":"2015-04-15T06:54:42Z","closed_at":null,"body":"Here's the logic to maintain the model's consistency I thought:\r\n1. Register/unregister an observer for the model by ID.(in ComponentController lifecycle methods)\r\n2. If some model modified, will get a notification and a new model copy.\r\n\r\nHowever I found the only way to update the model is use CKArrayControllerInputItems(update). \r\nSo I have to make a map<ID, indexpath> and tracking all model's update. \r\nWhat is the best practise to update the model in componentkit.\r\n\r\nThanks in advance.\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/componentkit/issues/comments/93222905","html_url":"https://github.com/facebook/componentkit/issues/114#issuecomment-93222905","issue_url":"https://api.github.com/repos/facebook/componentkit/issues/114","id":93222905,"user":{"login":"smalllixin","id":787881,"avatar_url":"https://avatars.githubusercontent.com/u/787881?v=3","gravatar_id":"","url":"https://api.github.com/users/smalllixin","html_url":"https://github.com/smalllixin","followers_url":"https://api.github.com/users/smalllixin/followers","following_url":"https://api.github.com/users/smalllixin/following{/other_user}","gists_url":"https://api.github.com/users/smalllixin/gists{/gist_id}","starred_url":"https://api.github.com/users/smalllixin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalllixin/subscriptions","organizations_url":"https://api.github.com/users/smalllixin/orgs","repos_url":"https://api.github.com/users/smalllixin/repos","events_url":"https://api.github.com/users/smalllixin/events{/privacy}","received_events_url":"https://api.github.com/users/smalllixin/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T06:54:42Z","updated_at":"2015-04-15T06:54:42Z","body":"@dstnbrkr yes"}}