Skip to content

Best way to decide which promises to call #1133

@Sergozh

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!

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