Skip to content

Best way to decide which promises to call #1133

Description

@Sergozh

Hello! Could you provide any idea of how to decide which promises should I use according to local data?

For example: I have to register user this is promise No.1, also I have promise No.2 for sending his Push notifications token to server. The problem is how to call fulfilling promises No.1 & No.2 if I have enough data for promise No.2 and how to call just No.1 when I haven't data for promise No.2?
Should I use nested closures such as:

promise1()
.done {
  promise2()
  .done {
  }
}

Big Thanks!

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