Skip to content

add a reader load timeout / redirect #116

Description

@Ligerx

notes

I want to check if fetching chapter, mangaInfo, and pageCount succeed.
If there's a failure in any of these, I want to go back or go back to the mangaInfo

I considered rethrowing an error in the actionCreator
However, errors MUST be caught. But requiring that dispatch().catch() everywhere seems like the wrong decision.

------------------
The best idea might be to use Promise.all()
It also technically ends early if any of the promises fails, but none of my
actionCreators throw errors so it should be fine.

I'll probably want to also add dispatch(fetchPageCount()) in the initial fetch useEffect()
Then in the Promise.all().then(), double check that all the values exist using useStore()

Hmmm does this handle the case where you're switching chapters?
Need more thinking on this


actually maybe I shouldn't spend time doing this unless I get a bug report for it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions