Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save enqtran/1c98f284da75fe359f72a093918c316a to your computer and use it in GitHub Desktop.
Save enqtran/1c98f284da75fe359f72a093918c316a to your computer and use it in GitHub Desktop.
Custom back button in react-native-router-flux
.....
const renderBackButton = () => (
<TouchableOpacity
onPress={() => Actions.pop()}
>
<View style={{ alignItems: 'center' }}>
<Image
source={require('./components/images/icon_back.png')}
style={{ width: 30, height: 20 }}
/>
{/*
<Icon name='ios-arrow-round-back' style={{ color: '#fff' }} />
*/}
</View>
</TouchableOpacity>
);
.....
<Scene
key="document_list"
component={DocumentList}
title={date_string()}
navigationBarStyle={styles.login_style_bar}
sceneStyle={styles.scene_style_login}
titleStyle={{ color: '#fff' }}
renderBackButton={() => renderBackButton()}
/>
.....
@bosz
Copy link

bosz commented Jun 5, 2019

Nice, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment