Skip to content

fix: useAsyncCallback in examples/base swallows rejections silently #256

@panz3r

Description

@panz3r

Context

Discovered during development of the showcase example (PR #252).

Problem

The useAsyncCallback pattern used in examples/base is missing a try/catch around the async callback. If the callback rejects, setLoading(false) is never called, leaving the UI in a permanent loading/spinner state. The error is silently swallowed with no user-visible feedback.

Impact

Users who encounter a login or API error in the base example will see the UI freeze in a loading state with no way to retry, and no error message displayed.

Proposed Action

Wrap the async callback body in a try/catch block, call setLoading(false) in a finally clause, and surface the error to the user (e.g. via component state).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions