Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const actionsBus = new ActionsBus();
- const addItem$ = actionsBus.actions$.pipe(
- filter(action => action.type === '[Shopping Cart] Add Item')
- );
- addItem$.subscribe((addItemAction) => {
- console.log(addItemAction.payload);
- })
- actionsBus.dispatch(new AddItem({ item: 'pizza' }));
Add Comment
Please, Sign In to add comment