effectName$ = createEffect(() => {
        return this.actions$.pipe(
            ofType(action),
            /** An EMPTY observable only emits completion. Replace with your own observable stream */
            operator(() => EMPTY));
      });
      Typescript language logo
      your recipe card header background

      Angular NgRx Create Effect

      Angular TypeScript Recipes

      When the code executes, it creates an Effect object and initializes it with an empty observable. Then, it calls the ofType() method on the actions observable, telling it to grab input from the action observable. Lastly, it calls the operator()() method on the EMPTY observable, telling it to emit completion events.

      Library: angular

      Shortcut: angular.ngrx.effect.create

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.