aksonov / aksonov/react-native-router-flux

Title changes with Action.refresh({key: Math.random()})

Ouverte
#3,693 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
8.9k
Forks
2.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Version
Tell us which versions you are using:
"react-native-router-flux": "^4.0.6",
"react-native": "0.61.5",
"react": "16.9.0",

### Expected behaviour

**I have this scene in Router.js**
```
(
Actions.currentScene !== 'SettingsScreen' ? Actions.SettingsScreen() :
{}}>

)}
renderTitle={() =>

@{this.props.user.username}

}
/>
```
And this Actions.refresh in **ProfileScreen**
```
static onEnter() {
console.log('onEnter profile tab' )
Actions.refresh({key: Math.random()}); // This will reRender data
}
```

Title shouldn't be change when I go another screen

### Actual behaviour

When I enter ProfileScreen at first there is no problem but when I go to SettingScreen via **renderLeftButton** and go back to **ProfileScreen** title changes to SettingScreen title(or another screen title). And I think its happen because of **onEnter** function

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.