Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent scene component visible in inherited scenes #1988

Closed
xahon opened this issue Jul 8, 2017 · 4 comments
Closed

Parent scene component visible in inherited scenes #1988

xahon opened this issue Jul 8, 2017 · 4 comments

Comments

@xahon
Copy link

xahon commented Jul 8, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4
  • react-native v0.45.1

Is there a way to embed inherited scenes into parent, like

<Scene
   key='tab_parent'
   component={ ParentComponent }
>
   <Scene
      key='tab_1'
      component={ Comp1 }
   >
   <Scene
      key='tab_2'
      component={ Comp2 }
   >
</Scene>

parent_component.js

export default class Parent extends Component {
   render () {
      return (
         <View>
            <CustomHeader />
            <CustomTabManipulator />
            <InheritSceneReference />
         </View>
      )
   }
}

I haven't found in documentation how to create custom header, custom tab switcher and refence to inherited scene.

How can i create something like this?
screenshot from 2017-07-08 16-52-23

@aksonov
Copy link
Owner

aksonov commented Jul 8, 2017 via email

@aksonov
Copy link
Owner

aksonov commented Jul 8, 2017

Also it is probably could be achieved with two navbars. One navbar belongs to first container, another to second (tabs).

Please check reactnavigation docs, v4 just creates needed hierarchy of Stack/Tab/Drawer navigators from defined Scenes.

@aksonov aksonov closed this as completed Jul 8, 2017
@xahon
Copy link
Author

xahon commented Jul 8, 2017

There is not explained how to create custom tab buttons in documentation

@aksonov aksonov reopened this Jul 8, 2017
@aksonov
Copy link
Owner

aksonov commented Jul 8, 2017

Please create separate issue for it and check reactnavigation docs - does it provide API for it or not. If so, then RNRF probably supports it as well - Router.js passes all props as TabNavigator second param (i.e. config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants