{"action":"created","comment":{"url":"https://api.github.com/repos/skidding/react-cosmos/pulls/comments/78777603","id":78777603,"diff_hunk":"@@ -225,9 +225,11 @@ module.exports = React.createClass({\n \n   renderComponent() {\n     return _.reduce(this.props.proxies, (accumulator, proxy) =>\n-      React.createElement(proxy, _.assign({}, this.props, {\n-        children: React.Children.only(accumulator),\n-      })), this.loadChild('preview'));\n+      React.createElement(proxy, _.assign({},\n+        this.constructor.getSelectedFixtureContents(this.props), {","path":"packages/react-component-playground/src/components/component-playground.jsx","position":8,"original_position":8,"commit_id":"42aaa56eafc738efe6a2daa5942cf8bcea6b8b94","original_commit_id":"42aaa56eafc738efe6a2daa5942cf8bcea6b8b94","user":{"login":"skidding","id":250750,"avatar_url":"https://avatars.githubusercontent.com/u/250750?v=3","gravatar_id":"","url":"https://api.github.com/users/skidding","html_url":"https://github.com/skidding","followers_url":"https://api.github.com/users/skidding/followers","following_url":"https://api.github.com/users/skidding/following{/other_user}","gists_url":"https://api.github.com/users/skidding/gists{/gist_id}","starred_url":"https://api.github.com/users/skidding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skidding/subscriptions","organizations_url":"https://api.github.com/users/skidding/orgs","repos_url":"https://api.github.com/users/skidding/repos","events_url":"https://api.github.com/users/skidding/events{/privacy}","received_events_url":"https://api.github.com/users/skidding/received_events","type":"User","site_admin":false},"body":"I've missed this the 1st time, but this needs further tweaking. We should be consistent in what we send to proxies vs what we send to the preview component. [THIS](https://github.com/skidding/react-cosmos/blob/42aaa56eafc738efe6a2daa5942cf8bcea6b8b94/packages/react-component-playground/src/components/component-playground.jsx#L132-L144) is what we send to the preview component. We don't need all of those keys, but we need `this.state.fixtureUnserializableProps` merged with `this.state.fixtureContents` to get the latest fixture contents (possibly updated by the user via the shinny editor 😉 ). We might need the component class as well in the future, in case proxies want to, say, display meta data of components on top of previewing them. \r\n\r\nProposition: Create a method that returns the current fixture contents:\r\n```js\r\nreturn _.assign({\r\n  component: this.constructor.getSelectedComponentClass(this.props)\r\n}, this.state.fixtureUnserializableProps, this.state.fixtureContents);\r\n```\r\nThen use it as proxy props and inside `preview()` children function, where you add `key`, `ref` and omit `state`.","created_at":"2016-09-14T15:52:44Z","updated_at":"2016-09-14T15:52:44Z","html_url":"https://github.com/skidding/react-cosmos/pull/203#discussion_r78777603","pull_request_url":"https://api.github.com/repos/skidding/react-cosmos/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/skidding/react-cosmos/pulls/comments/78777603"},"html":{"href":"https://github.com/skidding/react-cosmos/pull/203#discussion_r78777603"},"pull_request":{"href":"https://api.github.com/repos/skidding/react-cosmos/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/skidding/react-cosmos/pulls/203","id":85201701,"html_url":"https://github.com/skidding/react-cosmos/pull/203","diff_url":"https://github.com/skidding/react-cosmos/pull/203.diff","patch_url":"https://github.com/skidding/react-cosmos/pull/203.patch","issue_url":"https://api.github.com/repos/skidding/react-cosmos/issues/203","number":203,"state":"open","locked":false,"title":"Implement redux proxy","user":{"login":"bogdanstefan","id":7962223,"avatar_url":"https://avatars.githubusercontent.com/u/7962223?v=3","gravatar_id":"","url":"https://api.github.com/users/bogdanstefan","html_url":"https://github.com/bogdanstefan","followers_url":"https://api.github.com/users/bogdanstefan/followers","following_url":"https://api.github.com/users/bogdanstefan/following{/other_user}","gists_url":"https://api.github.com/users/bogdanstefan/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdanstefan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdanstefan/subscriptions","organizations_url":"https://api.github.com/users/bogdanstefan/orgs","repos_url":"https://api.github.com/users/bogdanstefan/repos","events_url":"https://api.github.com/users/bogdanstefan/events{/privacy}","received_events_url":"https://api.github.com/users/bogdanstefan/received_events","type":"User","site_admin":false},"body":"This adds a proxy which creates a Redux store using `createStore` and passes it to the children's context.\r\n\r\nIt will be published as a separate package, `react-cosmos-redux-proxy`.","created_at":"2016-09-14T10:18:32Z","updated_at":"2016-09-14T15:52:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d21efb3093e951f72a30c599a2cad378e979800d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/skidding/react-cosmos/pulls/203/commits","review_comments_url":"https://api.github.com/repos/skidding/react-cosmos/pulls/203/comments","review_comment_url":"https://api.github.com/repos/skidding/react-cosmos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skidding/react-cosmos/issues/203/comments","statuses_url":"https://api.github.com/repos/skidding/react-cosmos/statuses/42aaa56eafc738efe6a2daa5942cf8bcea6b8b94","head":{"label":"skidding:implement-redux-proxy","ref":"implement-redux-proxy","sha":"42aaa56eafc738efe6a2daa5942cf8bcea6b8b94","user":{"login":"skidding","id":250750,"avatar_url":"https://avatars.githubusercontent.com/u/250750?v=3","gravatar_id":"","url":"https://api.github.com/users/skidding","html_url":"https://github.com/skidding","followers_url":"https://api.github.com/users/skidding/followers","following_url":"https://api.github.com/users/skidding/following{/other_user}","gists_url":"https://api.github.com/users/skidding/gists{/gist_id}","starred_url":"https://api.github.com/users/skidding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skidding/subscriptions","organizations_url":"https://api.github.com/users/skidding/orgs","repos_url":"https://api.github.com/users/skidding/repos","events_url":"https://api.github.com/users/skidding/events{/privacy}","received_events_url":"https://api.github.com/users/skidding/received_events","type":"User","site_admin":false},"repo":{"id":16554395,"name":"react-cosmos","full_name":"skidding/react-cosmos","owner":{"login":"skidding","id":250750,"avatar_url":"https://avatars.githubusercontent.com/u/250750?v=3","gravatar_id":"","url":"https://api.github.com/users/skidding","html_url":"https://github.com/skidding","followers_url":"https://api.github.com/users/skidding/followers","following_url":"https://api.github.com/users/skidding/following{/other_user}","gists_url":"https://api.github.com/users/skidding/gists{/gist_id}","starred_url":"https://api.github.com/users/skidding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skidding/subscriptions","organizations_url":"https://api.github.com/users/skidding/orgs","repos_url":"https://api.github.com/users/skidding/repos","events_url":"https://api.github.com/users/skidding/events{/privacy}","received_events_url":"https://api.github.com/users/skidding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skidding/react-cosmos","description":"DX tool for designing truly encapsulated React components.","fork":false,"url":"https://api.github.com/repos/skidding/react-cosmos","forks_url":"https://api.github.com/repos/skidding/react-cosmos/forks","keys_url":"https://api.github.com/repos/skidding/react-cosmos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skidding/react-cosmos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skidding/react-cosmos/teams","hooks_url":"https://api.github.com/repos/skidding/react-cosmos/hooks","issue_events_url":"https://api.github.com/repos/skidding/react-cosmos/issues/events{/number}","events_url":"https://api.github.com/repos/skidding/react-cosmos/events","assignees_url":"https://api.github.com/repos/skidding/react-cosmos/assignees{/user}","branches_url":"https://api.github.com/repos/skidding/react-cosmos/branches{/branch}","tags_url":"https://api.github.com/repos/skidding/react-cosmos/tags","blobs_url":"https://api.github.com/repos/skidding/react-cosmos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skidding/react-cosmos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skidding/react-cosmos/git/refs{/sha}","trees_url":"https://api.github.com/repos/skidding/react-cosmos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skidding/react-cosmos/statuses/{sha}","languages_url":"https://api.github.com/repos/skidding/react-cosmos/languages","stargazers_url":"https://api.github.com/repos/skidding/react-cosmos/stargazers","contributors_url":"https://api.github.com/repos/skidding/react-cosmos/contributors","subscribers_url":"https://api.github.com/repos/skidding/react-cosmos/subscribers","subscription_url":"https://api.github.com/repos/skidding/react-cosmos/subscription","commits_url":"https://api.github.com/repos/skidding/react-cosmos/commits{/sha}","git_commits_url":"https://api.github.com/repos/skidding/react-cosmos/git/commits{/sha}","comments_url":"https://api.github.com/repos/skidding/react-cosmos/comments{/number}","issue_comment_url":"https://api.github.com/repos/skidding/react-cosmos/issues/comments{/number}","contents_url":"https://api.github.com/repos/skidding/react-cosmos/contents/{+path}","compare_url":"https://api.github.com/repos/skidding/react-cosmos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skidding/react-cosmos/merges","archive_url":"https://api.github.com/repos/skidding/react-cosmos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skidding/react-cosmos/downloads","issues_url":"https://api.github.com/repos/skidding/react-cosmos/issues{/number}","pulls_url":"https://api.github.com/repos/skidding/react-cosmos/pulls{/number}","milestones_url":"https://api.github.com/repos/skidding/react-cosmos/milestones{/number}","notifications_url":"https://api.github.com/repos/skidding/react-cosmos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skidding/react-cosmos/labels{/name}","releases_url":"https://api.github.com/repos/skidding/react-cosmos/releases{/id}","deployments_url":"https://api.github.com/repos/skidding/react-cosmos/deployments","created_at":"2014-02-05T18:48:27Z","updated_at":"2016-09-14T14:18:32Z","pushed_at":"2016-09-14T15:42:51Z","git_url":"git://github.com/skidding/react-cosmos.git","ssh_url":"git@github.com:skidding/react-cosmos.git","clone_url":"https://github.com/skidding/react-cosmos.git","svn_url":"https://github.com/skidding/react-cosmos","homepage":"https://www.youtube.com/watch?v=t9V2oKK83Kg","size":1609,"stargazers_count":1595,"watchers_count":1595,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":7,"forks":59,"open_issues":7,"watchers":1595,"default_branch":"master"}},"base":{"label":"skidding:master","ref":"master","sha":"91960de84cafd999c9a0d8ef191fa8c268bd7295","user":{"login":"skidding","id":250750,"avatar_url":"https://avatars.githubusercontent.com/u/250750?v=3","gravatar_id":"","url":"https://api.github.com/users/skidding","html_url":"https://github.com/skidding","followers_url":"https://api.github.com/users/skidding/followers","following_url":"https://api.github.com/users/skidding/following{/other_user}","gists_url":"https://api.github.com/users/skidding/gists{/gist_id}","starred_url":"https://api.github.com/users/skidding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skidding/subscriptions","organizations_url":"https://api.github.com/users/skidding/orgs","repos_url":"https://api.github.com/users/skidding/repos","events_url":"https://api.github.com/users/skidding/events{/privacy}","received_events_url":"https://api.github.com/users/skidding/received_events","type":"User","site_admin":false},"repo":{"id":16554395,"name":"react-cosmos","full_name":"skidding/react-cosmos","owner":{"login":"skidding","id":250750,"avatar_url":"https://avatars.githubusercontent.com/u/250750?v=3","gravatar_id":"","url":"https://api.github.com/users/skidding","html_url":"https://github.com/skidding","followers_url":"https://api.github.com/users/skidding/followers","following_url":"https://api.github.com/users/skidding/following{/other_user}","gists_url":"https://api.github.com/users/skidding/gists{/gist_id}","starred_url":"https://api.github.com/users/skidding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skidding/subscriptions","organizations_url":"https://api.github.com/users/skidding/orgs","repos_url":"https://api.github.com/users/skidding/repos","events_url":"https://api.github.com/users/skidding/events{/privacy}","received_events_url":"https://api.github.com/users/skidding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skidding/react-cosmos","description":"DX tool for designing truly encapsulated React components.","fork":false,"url":"https://api.github.com/repos/skidding/react-cosmos","forks_url":"https://api.github.com/repos/skidding/react-cosmos/forks","keys_url":"https://api.github.com/repos/skidding/react-cosmos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skidding/react-cosmos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skidding/react-cosmos/teams","hooks_url":"https://api.github.com/repos/skidding/react-cosmos/hooks","issue_events_url":"https://api.github.com/repos/skidding/react-cosmos/issues/events{/number}","events_url":"https://api.github.com/repos/skidding/react-cosmos/events","assignees_url":"https://api.github.com/repos/skidding/react-cosmos/assignees{/user}","branches_url":"https://api.github.com/repos/skidding/react-cosmos/branches{/branch}","tags_url":"https://api.github.com/repos/skidding/react-cosmos/tags","blobs_url":"https://api.github.com/repos/skidding/react-cosmos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skidding/react-cosmos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skidding/react-cosmos/git/refs{/sha}","trees_url":"https://api.github.com/repos/skidding/react-cosmos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skidding/react-cosmos/statuses/{sha}","languages_url":"https://api.github.com/repos/skidding/react-cosmos/languages","stargazers_url":"https://api.github.com/repos/skidding/react-cosmos/stargazers","contributors_url":"https://api.github.com/repos/skidding/react-cosmos/contributors","subscribers_url":"https://api.github.com/repos/skidding/react-cosmos/subscribers","subscription_url":"https://api.github.com/repos/skidding/react-cosmos/subscription","commits_url":"https://api.github.com/repos/skidding/react-cosmos/commits{/sha}","git_commits_url":"https://api.github.com/repos/skidding/react-cosmos/git/commits{/sha}","comments_url":"https://api.github.com/repos/skidding/react-cosmos/comments{/number}","issue_comment_url":"https://api.github.com/repos/skidding/react-cosmos/issues/comments{/number}","contents_url":"https://api.github.com/repos/skidding/react-cosmos/contents/{+path}","compare_url":"https://api.github.com/repos/skidding/react-cosmos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skidding/react-cosmos/merges","archive_url":"https://api.github.com/repos/skidding/react-cosmos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skidding/react-cosmos/downloads","issues_url":"https://api.github.com/repos/skidding/react-cosmos/issues{/number}","pulls_url":"https://api.github.com/repos/skidding/react-cosmos/pulls{/number}","milestones_url":"https://api.github.com/repos/skidding/react-cosmos/milestones{/number}","notifications_url":"https://api.github.com/repos/skidding/react-cosmos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skidding/react-cosmos/labels{/name}","releases_url":"https://api.github.com/repos/skidding/react-cosmos/releases{/id}","deployments_url":"https://api.github.com/repos/skidding/react-cosmos/deployments","created_at":"2014-02-05T18:48:27Z","updated_at":"2016-09-14T14:18:32Z","pushed_at":"2016-09-14T15:42:51Z","git_url":"git://github.com/skidding/react-cosmos.git","ssh_url":"git@github.com:skidding/react-cosmos.git","clone_url":"https://github.com/skidding/react-cosmos.git","svn_url":"https://github.com/skidding/react-cosmos","homepage":"https://www.youtube.com/watch?v=t9V2oKK83Kg","size":1609,"stargazers_count":1595,"watchers_count":1595,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":7,"forks":59,"open_issues":7,"watchers":1595,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skidding/react-cosmos/pulls/203"},"html":{"href":"https://github.com/skidding/react-cosmos/pull/203"},"issue":{"href":"https://api.github.com/repos/skidding/react-cosmos/issues/203"},"comments":{"href":"https://api.github.com/repos/skidding/react-cosmos/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/skidding/react-cosmos/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/skidding/react-cosmos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skidding/react-cosmos/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/skidding/react-cosmos/statuses/42aaa56eafc738efe6a2daa5942cf8bcea6b8b94"}}}}
{"actor":{"display_login":"skidding"}}