angular-architects / ngrx-toolkit

Various Extensions for the NgRx Signal Store
MIT License
146 stars 22 forks source link

Allow an effect to listen for multiple different actions #44

Open Chudroy opened 5 months ago

Chudroy commented 5 months ago

with original ngrx store, you can have

  effect$ = createEffect(
    () =>
      this.actions$.pipe(
        ofType(Actions.action1, Actions.action2),
        tap(() => this.service.doSomething())
      ),
  )

the ofType allowing multiple actions as arguments. However this is not the case with the create function within the effects of WithRedux in the signal store.

Chudroy commented 5 months ago

by the way thank you for implementing my previously requested features!

rainerhahnekamp commented 5 months ago

Sure thing, please continue giving feedback and requesting features. The whole ngrx-toolkit would be worthless if nobody uses it 😄