dotNetify icon indicating copy to clipboard operation
dotNetify copied to clipboard

[Feature] Calling non void method with results

Open ColonelBundy opened this issue 3 years ago • 2 comments

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?

ColonelBundy avatar Jan 16 '22 22:01 ColonelBundy

Sounds like a good feature to have. Thanks for suggesting it!

dsuryd avatar Jan 16 '22 23:01 dsuryd

Any news on this? This would be a really nice feature.

DG4ever avatar Oct 19 '23 11:10 DG4ever