Skip to content

Why callback handlers? #4

Description

@ryyppy

Hey it's me again!
I am just leaving some issues while I am discovering the API and will ask questions which will pop in my head, so everything is in structure ... I have used co and redux-saga quite a lot and was a little bit confused by some things :-)

So here is the most important one... Why does runtime always need two callbacks? Why doesn't it also support Promises?

like this:

const runtime = create();

const successFn = () => {};
const failFn = () => {};

runtime(myGenerator).then(successFn).catch(failFn);

(I am currently working on a pull request to make examples easier to understand btw)

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