{"action":"created","issue":{"url":"https://api.github.com/repos/leonardorb/react-tree-component/issues/1","labels_url":"https://api.github.com/repos/leonardorb/react-tree-component/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/leonardorb/react-tree-component/issues/1/comments","events_url":"https://api.github.com/repos/leonardorb/react-tree-component/issues/1/events","html_url":"https://github.com/leonardorb/react-tree-component/issues/1","id":118110418,"number":1,"title":"Solving too many problems at once","user":{"login":"edygar","id":566280,"avatar_url":"https://avatars.githubusercontent.com/u/566280?v=3","gravatar_id":"","url":"https://api.github.com/users/edygar","html_url":"https://github.com/edygar","followers_url":"https://api.github.com/users/edygar/followers","following_url":"https://api.github.com/users/edygar/following{/other_user}","gists_url":"https://api.github.com/users/edygar/gists{/gist_id}","starred_url":"https://api.github.com/users/edygar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edygar/subscriptions","organizations_url":"https://api.github.com/users/edygar/orgs","repos_url":"https://api.github.com/users/edygar/repos","events_url":"https://api.github.com/users/edygar/events{/privacy}","received_events_url":"https://api.github.com/users/edygar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T19:32:00Z","updated_at":"2015-11-20T21:41:01Z","closed_at":null,"body":"Constructive critic here:\r\nYou are solving too many problems at once here. By fetching data instead of dealing just with the presentation you are locking both the tree and the data source.\r\n\r\nIMHO, a better approach could be decoupling the data fetching from the tree state component. It could deal only with the state of the tree, what is opened or not, select/focused or not, otherwise it's a too smart dumb component. Where the fetched data lives? Right now, it is seized into component's state.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/leonardorb/react-tree-component/issues/comments/158532169","html_url":"https://github.com/leonardorb/react-tree-component/issues/1#issuecomment-158532169","issue_url":"https://api.github.com/repos/leonardorb/react-tree-component/issues/1","id":158532169,"user":{"login":"leonardorb","id":37300,"avatar_url":"https://avatars.githubusercontent.com/u/37300?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardorb","html_url":"https://github.com/leonardorb","followers_url":"https://api.github.com/users/leonardorb/followers","following_url":"https://api.github.com/users/leonardorb/following{/other_user}","gists_url":"https://api.github.com/users/leonardorb/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardorb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardorb/subscriptions","organizations_url":"https://api.github.com/users/leonardorb/orgs","repos_url":"https://api.github.com/users/leonardorb/repos","events_url":"https://api.github.com/users/leonardorb/events{/privacy}","received_events_url":"https://api.github.com/users/leonardorb/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T21:41:01Z","updated_at":"2015-11-20T21:41:01Z","body":"@edygar you're totally right. This is included in our bullet points in the `README` (under `On the road map`).\r\n- A more generic approach\r\n\r\nData fetching does not belong to the component at all. In a near future, everything that the component will need to know is where is the data and what tree node param we're using to control and build hierarchy.\r\n\r\nThanks for your comment! And I'm expecting some contributions along the way. :)"}}