Skip to content

Using Angular 21 signal forms submit function with rxMethod from ngrx is impossible, please create a new function to return promise to be able to be used in angular 21 signal forms #4980

@rezaimn

Description

@rezaimn

Which @ngrx/* package(s) are relevant/related to the feature request?

signals

Information

I was trying out the new feature from Angular 21 and wanted to use it with ngrx signal store. However, I realized it is impossible to use it in the signal forms submit function because it requires a promise in return, but rxMethod returns only a destroy. Therefore, we need a function that returns a promise instead.

In this article I explained the issue and created a new method called rxPromiseMethod to be used instead of rxMethod within withMethod(). You can find some examples there.

https://medium.com/@mohammadrezaimn/rxpromisemethod-bridging-ngrx-signal-store-with-angulars-signal-forms-f80483adcb35

Describe any alternatives/workarounds you're currently using

There is a withMutation function from the @angular-architects/ngrx-toolkit library, but the issue is that you can only send a payload to it, and the types are tightly coupled with the HTTP request DTO, which is not good.

I would be willing to submit a PR to fix this issue

  • Yes
  • No

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