Notifications in Angular NgRx inside Effects as a side Actions

The end

The end with the final code…

Introduction

Our use case

Notification system

Installing Dependencies

$ npm install ngx-toastr@11.3.3 --save
"styles": [
"styles.scss",
"node_modules/ngx-toastr/toastr.css"
]
import { ToastrModule } from ‘ngx-toastr’;...@NgModule({declarations: ...,imports: [...ToastrModule.forRoot({
positionClass: "toast-bottom-full-width",
//preventDuplicates: true
})
...

The Magic

https://github.com/ackuser/angular-ngrx-ngx-toastr/blob/master/src/app/counter.actions.ts
https://github.com/ackuser/angular-ngrx-ngx-toastr/blob/master/src/app/counter.reducer.ts
https://github.com/ackuser/angular-ngrx-ngx-toastr/blob/master/src/app/counter.effects.ts

The end (again)

Conclusion

--

--

--

Among other things | 🚀 Software Engineer 👨‍💻 passionated ❣ about Angular, Node, RxJS and DataViz. Toppings that do my life & code easier 🏖 and less 🍝 🚀 |

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Test your REACT app efficiently with Protractor

Programmer Life

CSS supports special selectors for range inputs 🔥

How to Deploy a Hello World React Project to Firebase Hosting with Custom URL from Google Domains

React explained and made Simple

React component lifecycle

four stages of React component

Passing Generic types to JSX elements

Ionic 4: All you need to know

Resultado de imagen de ionic framework

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Karim

Karim

Among other things | 🚀 Software Engineer 👨‍💻 passionated ❣ about Angular, Node, RxJS and DataViz. Toppings that do my life & code easier 🏖 and less 🍝 🚀 |

More from Medium

Building Autocomplete Search Component from Scratch: Angular

Lesson 12 : Services @injectable and sharing data between cross components

NgStyle in Angular with example

How to fix logging for proxy in angular