{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/6268","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/6268/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/6268/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/6268/events","html_url":"https://github.com/facebook/react-native/issues/6268","id":138158481,"number":6268,"title":"Shared a component between scenes occurs a unwanted behavior on render","user":{"login":"srlopez","id":94729,"avatar_url":"https://avatars.githubusercontent.com/u/94729?v=3","gravatar_id":"","url":"https://api.github.com/users/srlopez","html_url":"https://github.com/srlopez","followers_url":"https://api.github.com/users/srlopez/followers","following_url":"https://api.github.com/users/srlopez/following{/other_user}","gists_url":"https://api.github.com/users/srlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/srlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srlopez/subscriptions","organizations_url":"https://api.github.com/users/srlopez/orgs","repos_url":"https://api.github.com/users/srlopez/repos","events_url":"https://api.github.com/users/srlopez/events{/privacy}","received_events_url":"https://api.github.com/users/srlopez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/Contains%20Potential%20Question%20Keywords","name":"Contains Potential Question Keywords","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-03T12:00:11Z","updated_at":"2016-03-03T15:29:44Z","closed_at":null,"body":"Between scenes that share a component, the component thought to belong to the first scene that render it.\r\n\r\nUsing \r\n- \"react-native\": \"0.19.0\",\r\n- \"react-redux\": \"4.1.2\",\r\n- \"redux\": \"3.1.7\",\r\nas @alinzin explain in [github](https://github.com/alinz/example-react-native-redux), with all the tricks to setup this project. Are out there any other good solution? \r\n\r\nThis is a simple App that shares a component between scenes using Navigator in [stackoverflow.com](http://stackoverflow.com/questions/35769644/) [http://stackoverflow.com/questions/35769644/](url)\r\n\r\nThe data to be presented is a counter, stored in a Redux store, so it is not on the state of the component.\r\nThe  inner component  thinks belong to the first scene that presented it, and does not behave as expected on rendering in the second component.\r\n\r\nThe first scene use 'connect' to pass state and actions as props, but the second scene receive their props as passProps from the Navigator. Is this \r\n\r\nWich is the default behavior in theses cases.\r\nI am wrong with this approach to share components?"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/191814984","html_url":"https://github.com/facebook/react-native/issues/6268#issuecomment-191814984","issue_url":"https://api.github.com/repos/facebook/react-native/issues/6268","id":191814984,"user":{"login":"grabbou","id":2464966,"avatar_url":"https://avatars.githubusercontent.com/u/2464966?v=3","gravatar_id":"","url":"https://api.github.com/users/grabbou","html_url":"https://github.com/grabbou","followers_url":"https://api.github.com/users/grabbou/followers","following_url":"https://api.github.com/users/grabbou/following{/other_user}","gists_url":"https://api.github.com/users/grabbou/gists{/gist_id}","starred_url":"https://api.github.com/users/grabbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grabbou/subscriptions","organizations_url":"https://api.github.com/users/grabbou/orgs","repos_url":"https://api.github.com/users/grabbou/repos","events_url":"https://api.github.com/users/grabbou/events{/privacy}","received_events_url":"https://api.github.com/users/grabbou/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T15:29:44Z","updated_at":"2016-03-03T15:29:44Z","body":"Ah, sorry - forgot to mention your App component has to be connected to Redux. So you should do:\r\n```js\r\nexport default class RootComponent extends Component {\r\n  render() {\r\n    return (\r\n      <Provider store={createStoreWithMiddleware(reducer, initialState)}>\r\n        <App />\r\n      </Provider>\r\n    )\r\n  }\r\n}\r\n```\r\nand change your App to be connected to redux store. Then, you should be able to pass down the props from store to underlying components (currently your Scene1 component is connected to Redux so that all changes made to store only cause re-render in that component)."}}