Skip to content

[Feature] Calling non void method with results #305

Description

@ColonelBundy

Consider the following method:

public string Hello(string input) {
    return "Hello " + input;
}

And then calling it using dispatch

const data = dotnetify.$dispatch({ Hello: "world" });

Data is obviously undefined, could there be a version of $dispatch that returns a promise with the result?

Use case is obviously being able to display loading indicators when fetching information and/or fetching data that does not belong in the usual state of the view model eg. Login with simply a boolean for result.

Thoughts?

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions