handler.ts
1 async function handleSave() {
2 send({ type: 'SAVE' })
3 try {
4 await api.save()
5 send({ type: 'SUCCESS' })
6 clearError()
7 } catch {
8 send({ type: 'FAIL' })
9 incrementRetries()
10 }
11 }
when lost, press H to go home
github