Skip to content

Commit 5ab56ff

Browse files
Prevent automatic call button onPress
Otherwise it is calling automatically while render() is call
1 parent 68e31f0 commit 5ab56ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

App/Containers/Example/ExampleScreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ExampleScreen extends React.Component {
4949
</Text>
5050
</View>
5151
)}
52-
<Button onPress={this.props.fetchUser} title="Refresh" />
52+
<Button onPress={() => this.props.fetchUser} title="Refresh" />
5353
</View>
5454
)}
5555
</View>

0 commit comments

Comments
 (0)