I need some help to use React Native - react navigation library.It is Tab bar, but the Upload button acted as floating action button.
I have try :
const click = () => { console.log('click'); return (<View><Text>a</Text></View> );};tabBarOnPress: (tab) => { click();},// Main Page Navigatorexport const Main = TabNavigator({ Home: { screen: HomeNavigator, }, Explore: { screen: ExploreNavigator, }, Upload: { screen: UploadMain, navigationOptions: ({ navigation }) => ({ tabBarLabel: 'Upload', tabBarIcon: ({ tintColor }) => (<View><Icon name="camera" size={26} color={tintColor} /></View> ), tabBarOnPress: (tab) => { click(); }, }), },}, { tabBarComponent: TabBarBottom, tabBarPosition: 'bottom', backBehavior: 'none', swipeEnabled: false, lazy: true, animationEnabled: false, showIcon: true, tabBarOptions: { activeTintColor: 'black', },});
The Upload button is need to act as floating action button, when it clicked, it already logging, but not rendering the component.Any workaround to create the floating action button?
I've some tricks like this https://github.com/react-navigation/react-navigation/pull/1335
But, it is only click and dispatch navigation, not doing floating action button
Regards,Charlie