{"action":"created","issue":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/3208","repository_url":"https://api.github.com/repos/aksonov/react-native-router-flux","labels_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/3208/labels{/name}","comments_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/3208/comments","events_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/3208/events","html_url":"https://github.com/aksonov/react-native-router-flux/issues/3208","id":353669171,"node_id":"MDU6SXNzdWUzNTM2NjkxNzE=","number":3208,"title":"is it possible to create a custom Scene instead of  use original Scene?","user":{"login":"HengCC","id":6167532,"node_id":"MDQ6VXNlcjYxNjc1MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6167532?v=4","gravatar_id":"","url":"https://api.github.com/users/HengCC","html_url":"https://github.com/HengCC","followers_url":"https://api.github.com/users/HengCC/followers","following_url":"https://api.github.com/users/HengCC/following{/other_user}","gists_url":"https://api.github.com/users/HengCC/gists{/gist_id}","starred_url":"https://api.github.com/users/HengCC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HengCC/subscriptions","organizations_url":"https://api.github.com/users/HengCC/orgs","repos_url":"https://api.github.com/users/HengCC/repos","events_url":"https://api.github.com/users/HengCC/events{/privacy}","received_events_url":"https://api.github.com/users/HengCC/received_events","type":"User","site_admin":false},"labels":[{"id":369900625,"node_id":"MDU6TGFiZWwzNjk5MDA2MjU=","url":"https://api.github.com/repos/aksonov/react-native-router-flux/labels/discussion","name":"discussion","color":"fef2c0","default":false},{"id":252407231,"node_id":"MDU6TGFiZWwyNTI0MDcyMzE=","url":"https://api.github.com/repos/aksonov/react-native-router-flux/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-24T07:06:52Z","updated_at":"2018-08-27T01:33:20Z","closed_at":null,"author_association":"NONE","body":"I want to handle some things in a unified way when the scene trigger `onEnter`, like:\r\n```\r\nimport React, { Component } from 'react';\r\nimport { Scene } from 'react-native-router-flux';\r\nclass CustomScene extends Component {\r\n  constructor(props) {\r\n    super(props);\r\n  }\r\n\r\n  enterScene = (val) => {\r\n    console.log(\"Scene onEnter val:\");\r\n    if (this.props.onEnter) {\r\n      this.props.onEnter(val)\r\n    }\r\n  }\r\n  render() {\r\n    console.log(\"scene props:\", this.props);\r\n    const { onEnter, on, ...rest } = this.props;\r\n    return (\r\n      <Scene onEnter={this.enterScene} on={this.enterScene} {...rest} >\r\n        {this.props.children}\r\n      </Scene>\r\n    );\r\n  }\r\n}\r\n\r\nexport default CustomScene;\r\n\r\n```\r\n\r\nthen use it:\r\n\r\n```\r\nimport CustomScene from './Scene';\r\n <Router>\r\n        <CustomScene key=\"root\">\r\n          <CustomScene key=\"login\" hideNavBar component={RouterComponent.Login} />\r\n        </CustomScene>\r\n</Router>\r\n```\r\nIs this feasible?"},"comment":{"url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/comments/416090319","html_url":"https://github.com/aksonov/react-native-router-flux/issues/3208#issuecomment-416090319","issue_url":"https://api.github.com/repos/aksonov/react-native-router-flux/issues/3208","id":416090319,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjA5MDMxOQ==","user":{"login":"HengCC","id":6167532,"node_id":"MDQ6VXNlcjYxNjc1MzI=","avatar_url":"https://avatars0.githubusercontent.com/u/6167532?v=4","gravatar_id":"","url":"https://api.github.com/users/HengCC","html_url":"https://github.com/HengCC","followers_url":"https://api.github.com/users/HengCC/followers","following_url":"https://api.github.com/users/HengCC/following{/other_user}","gists_url":"https://api.github.com/users/HengCC/gists{/gist_id}","starred_url":"https://api.github.com/users/HengCC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HengCC/subscriptions","organizations_url":"https://api.github.com/users/HengCC/orgs","repos_url":"https://api.github.com/users/HengCC/repos","events_url":"https://api.github.com/users/HengCC/events{/privacy}","received_events_url":"https://api.github.com/users/HengCC/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T01:33:20Z","updated_at":"2018-08-27T01:33:20Z","author_association":"NONE","body":"@daviscabral   thanks! I have tried your idea, but it still doesn't work. \r\nMy current solution is to add the onEnter event to each Scene."}}
{"actor":{"display_login":"HengCC"}}