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

Fixed header when switching tabs #3007

Closed
isamuhiro opened this issue Apr 23, 2018 · 3 comments
Closed

Fixed header when switching tabs #3007

isamuhiro opened this issue Apr 23, 2018 · 3 comments

Comments

@isamuhiro
Copy link

Version

Tell us which versions you are using:

  • "react-native-router-flux": "^4.0.0-beta.28",
  • "react-native": "~0.54.1",

What would be a good approach to create a header which can be fixed in all tabbar/stacked childrens?
Can you guys provide a snack example or some workaround?

@daviscabral
Copy link
Collaborator

@isamuhiro could you find a solution for this?

@isamuhiro
Copy link
Author

isamuhiro commented May 14, 2018

@daviscabral yeah, I just declared an Header component into the navBar props on <Stack/> component. It should be the pattern component of <Tabs/>.
Should be something like this:

<Stack key="app" navBar={Header}>
  <Tabs>
    //Your scene components containing a fixed header 
  </Tabs>
</Stack>

@daviscabral
Copy link
Collaborator

Great - thank you for taking the time to write about it here.

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