I have a bottom tab with buttons A,B,C,D,E.
- When I'm on screen A I want the tab to show B,C,D,E buttons but not button A.
- When I'm on screen B I want the tab to show A,C,D,E buttons but not button B.
- When I'm on other screens I want to show A,C,D,E buttons or B,C,D,E (depends witch I pick A or B).
I have searched all over google, stackoverflow, youtube and have not seen a solution to this need.
- I'm using react navigation v5.
I have tried in many ways and somethings like this:
<Tab.Screen name="A" component={A}
options={
()=>{
tabBarButton:(props)=>{
if(isScreen("A")){
return null;
}else{
return <TouchableOpacity {...props}/>
}
}
}
}
/>
<Tab.Screen name="B" component={B}
options={
()=>{
tabBarButton:(props)=>{
if(isScreen("A")){
return <TouchableOpacity {...props}/>
}else{
return null;
}
}
}
}
/>
But this gives me not the correct behavior even though it does not error out!!
If you guys do not understand the problem let me know and i will make the problem more concrete.
If you do not have time to explain the solution at least give me a code sample or an article or something for this use case.
PLZ HELP.