I am using react-navigation
, currently I am using the Stack
and Bottom Tabs
, but I also need a Top Tabs
as well.
I see the option of Material Top Tabs
, but again as per the rule, I can only use one navigator, any workaround to that?
Basically my top tab will have my logo and cart icon
and bottom tab will have usual home, search and settings
2
Answers
Found the solution make a custom header component and then do this
You can create a reusable
<Header />
component that has the logo and buttons in it.Here’s an example usage of a Header component that I’ve used for years:
You can then place this at the top of each file that needs the
Header
.