Skip to content

Instantly share code, notes, and snippets.

@yackinn
Last active January 20, 2021 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yackinn/5358ac1559581e94b60103788bae75bc to your computer and use it in GitHub Desktop.
Save yackinn/5358ac1559581e94b60103788bae75bc to your computer and use it in GitHub Desktop.
@Effect({ dispatch: true })
addTodo$ = this.actions$.pipe(
ofType(TodoActions.addTodo),
tap(({ todo }) => this.todoStore.add(todo)),
map(({ todo }) => SnackbarActions.showSnackbar({ message: `Item has been added ${todo.title}` }))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment