React-native-router-flux: V4 RenderRightButton not working when passed in Actions.refresh

Created on 8 Aug 2017  路  4Comments  路  Source: aksonov/react-native-router-flux

Version

Expected behaviour

When using Actions.refresh({ renderRightButton: this.renderRightButton }); it is expected that the renderRightButton method is called and the right button rendered.

This is the renderRightButton method:

renderRightButton = (props) => {
    return <TouchableOpacity onPress={this.logout}><Icon name="power" size={25} color="white" /></TouchableOpacity>
  }

Actual behaviour

No button is rendered, but if I try the static renderRightButton it works.

Most helpful comment

Could you try to pass right ? renderRightButton is too long, probably we need to update docs to use right.

All 4 comments

Could you try to pass right ? renderRightButton is too long, probably we need to update docs to use right.

It's right as @aksonov said. I had this issue yesterday, tried renderRight and headerRight.

With right the button gets rendered button if width is large then it gets cut off.
But if I use renderRightButton as Scene prop in Router then it does not get cut off.
Any idea about this?

@aksonov Docs is still not updated. It still says renderRightButton

Was this page helpful?
0 / 5 - 0 ratings

Related issues

llgoer picture llgoer  路  3Comments

moaxaca picture moaxaca  路  3Comments

GCour picture GCour  路  3Comments

YouYII picture YouYII  路  3Comments

xnog picture xnog  路  3Comments