diff --git a/resources/views/docs/mobile/4/digging-deeper/async-tasks.md b/resources/views/docs/mobile/4/digging-deeper/async-tasks.md index c187201d1..a968cf82f 100644 --- a/resources/views/docs/mobile/4/digging-deeper/async-tasks.md +++ b/resources/views/docs/mobile/4/digging-deeper/async-tasks.md @@ -143,14 +143,22 @@ up with `#[On]`: use Native\Mobile\Attributes\On; #[On('sync-complete')] -public function syncComplete($event): void +public function syncComplete(mixed $result = null, string $status = 'finished'): void { - $this->lastSync = $event->result; + $this->lastSync = $result; } ``` -The event payload carries `id`, a `status` of `finished` or `failed`, and either `result` or the failure -details. +The payload carries `id`, a `status` of `finished` or `failed`, and then either `result` (on success) or +`exceptionClass`, `message` and `trace` (on failure). + + ## Running several at once