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

Global parent component for inherited scenes #1981

Closed
xahon opened this issue Jul 7, 2017 · 2 comments
Closed

Global parent component for inherited scenes #1981

xahon opened this issue Jul 7, 2017 · 2 comments

Comments

@xahon
Copy link

xahon commented Jul 7, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v3.41.0
  • react-native v0.45.1

Is there way to create 'root' tab scene and keep its global component on the top of it, like header

For example i have 2 tab scenes

<Scene key='root'>
   <Scene key='mytabscene' component={ GlobalHeader }>
      <Scene key='tab_1'  component={ MyComponent1 } />
      <Scene key='tab_1' component={ MyComponent2 } />
   </Scene>
</Scene>

globalHeader.js

export default class GlobalHeader extends React.Component {
   render () {
      return (
         <View>
            <Text>Parent component</Text>
            <SomeCustomTabManipulator /> // Custom tab switcher
            <InheritScene />
         </View>
      )
   }
}

MyCompoent.js

export default class MyComponent1 extends React.Component {
   render () {
      return (
         <View>
            <SceneGlobalComponent /> // Here should be component 
            <Text>Other content</Text>
         </View>
      )
   }
}
@aksonov
Copy link
Owner

aksonov commented Jul 7, 2017

v3 is not supported anymore. Please test v4 and create issues if any.

@aksonov aksonov closed this as completed Jul 7, 2017
@rochapablo
Copy link

rochapablo commented Jul 7, 2017

Which v4? Isn't 3.41.0 the last one?

Never mind.

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

3 participants