React-native-router-flux: renderRightButton Actions.refresh() not working

Created on 9 Jul 2018  路  3Comments  路  Source: aksonov/react-native-router-flux

"react-native": "0.55.4"
"react-native-router-flux": "^4.0.0-beta.31"

in my code :
renderRightButton = () => (
onPress={() => {
DeviceEventEmitter.emit(TYPE.EDIT_ADDRESS_BOOK);
}}
>


)

componentDidMount() {
    Actions.refresh({ renderRightButton: this.renderRightButton });
}

Most helpful comment

using right insteadof renderRightButton

All 3 comments

using right insteadof renderRightButton

using setTimeout my be help

 componentDidMount() {
    setTimeout(() => {
        Actions.refresh({ renderRightButton: this.renderRightButton });
    }, delayTime)
  } 

the scene key is prev navigation's when redux update data

the code in navigationStore.js Line 930

const { key } = getActiveState(this.state);

I saw quite a few people mentioning the setTimeout fix. I tried it with renderRightButton, didn't work. However, using right does work. Thanks @zouminhuababa, life saver. And I am surprised that I can't find right in any API doc. @aksonov, is that deprecated or something else?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VictorK1902 picture VictorK1902  路  3Comments

willmcclellan picture willmcclellan  路  3Comments

moaxaca picture moaxaca  路  3Comments

maphongba008 picture maphongba008  路  3Comments

basdvries picture basdvries  路  3Comments