-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove additional
fetchError
prop from hook return object (…
…#262) Code in this PR removes the `fetchError` prop from hook return object. Now the returned object is of type `SafeActionResult`. This means that if an error gets thrown inside an action, and the `handleServerError` init option rethrows it instead of setting the `serverError` prop, now the `execute`/`executeAsync` functions will throw it too inside the component, so the handling is managed by the user. This is the same behavior as directly calling a throwable safe action inside the component.
- Loading branch information
Showing
3 changed files
with
13 additions
and
49 deletions.
There are no files selected for viewing
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
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
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