React-native-router-flux: renderBackButton() not working anymore

Created on 7 Mar 2017  路  3Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v3.36.0
  • react-native v0.34.1

Expected behaviour

Show a custom back button

Actual behaviour

It's not showing anymore all of a sudden. When I removerenderBackButton() it shows the default button though.

renderBackButton={() => <BackButton /> }

  render(){
    const { color } = this.props
    return(
      <TouchableOpacity style={ Style.container } onPress={() => { Actions.main({ type:  ActionConst.BACK_ACTION }) }}>
        <View>
          <Icon name="ios-arrow-round-back-outline" size={35} color="#fff" />
        </View>
      </TouchableOpacity>
    )
  }

Most helpful comment

It was a style setting, I had it on 'position: absolute' .. Weird it only fails now

All 3 comments

For me, it's working this way:

const backButton = () => (<Icon name="arrow-back" size={24} color={COLORS.Light} onPress={()=> Actions.pop()} />);

<Scene renderBackButton={backButton} />

@renancsoares That's not working either here

It was a style setting, I had it on 'position: absolute' .. Weird it only fails now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wootwoot1234 picture wootwoot1234  路  3Comments

sreejithr picture sreejithr  路  3Comments

sarovin picture sarovin  路  3Comments

kirankalyan5 picture kirankalyan5  路  3Comments

vinayr picture vinayr  路  3Comments