Skip to content

[RFC]Support async generator as Effect #59

Open
@Brooooooklyn

Description

@Brooooooklyn

RxJS is great as process management, but sometimes our Effect dosen't need too much async management ability. So I really want a simpler way to provide async management ability.

@GeneratorEffect()
async fetchUserInfo(payload:  T) {
  const response = await client.query({ ... })
  try {
    yield this.getActions().setUserInfo(assertSuccess(response))
  } catch (e) {
    yield this.getActions().getUserInfoFailed(e)
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions