Created
January 2, 2018 22:32
-
-
Save rt2zz/8fd3d4a04247fa8be49a0092c22b3e7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A extends Component { | |
doSomething = async () => { | |
this.setState({pending: true}) | |
try { | |
await doSomething() | |
} catch (err) { | |
} finally { | |
this.setState({pending: true}) | |
} | |
} | |
// ... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment