v6.4.1 (React-Native 0.39.2) Dirty flag is not set on iOS
See original GitHub issueHi,
I’m trying to show a “Save” button on the NavBar when the form is “dirty”. So I use “this.props.dirty” to check that and show the state of the form (“Clean” or “Dirty”). But “this.props.dirty” is never set on iOS simulator, however working fine on Android simulator. Any idea?
componentDidMount() {
Actions.refresh({ renderRightButton: this.renderRightButton });
}
renderRightButton = () => {
if (this.props.dirty) {
return (
<TouchableOpacity onPress={this.onAddAccount}>
<Text>Dirty</Text>
</TouchableOpacity>
);
}
return (
<TouchableOpacity onPress={this.onAddAccount}>
<Text>Clean</Text>
</TouchableOpacity>
);
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter
aacgain 1.8 AAC‑supporting version of mp3gain
aalib 1.4rc5 Portable ASCII art graphics library
aamath 0.3 Renders mathematical expressions as ASCII art
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solved it by forcing the NavBar to re-render when the component is updated.
The redux store for the Form seems identical but I don’t know where the “dirty” flag is stored…