-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
// store
withMutations((store) => ({
myMutation: httpMutation((myNum: number) => ({
url: `/api/register/myMutation/${myNum}`,
method: 'GET',
headers: apiHeaders(),
})),
})),wrong usage (example 1)
// component
readonly myMutation = this.store.myMutation; // Mutation<number, any>
// html
{{ myMutation.isPending() }}
// runtime error:
ERROR TypeError: ctx.myMutation.isPending is not a functioncorrect usage (example 2)
// component
readonly myMutationIsPending = this.store.myMutationIsPending;
// html
{{ myMutationIsPending() }}- I would love that
example 1would work. - The Typings give you the feeling that
example 1should work, but then you end in a runtime error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels