Skip to content

Instantly share code, notes, and snippets.

@kendhia
Created November 2, 2019 08:07
Show Gist options
  • Select an option

  • Save kendhia/820d31259f08034f806c1f8128466755 to your computer and use it in GitHub Desktop.

Select an option

Save kendhia/820d31259f08034f806c1f8128466755 to your computer and use it in GitHub Desktop.
<TouchableOpacity onPress={() => this.callFunction()}>
{!this.state.loading && !this.state.resultAvailable && (
<Text>Click Me!</Text>
)}
{this.state.loading && (
<Text>Loading</Text>
)}
{this.state.resultAvailable && (
<Text>{this.state.result}</Text>
)}
</TouchableOpacity>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment