Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

176
Vistas
How to resolve the "Avoid dispatching many actions in a row" lint warning in NgRx?

I am getting this warning when I have a lot of actions in a component function: Avoid dispatching many actions in a row to accomplish a larger conceptual "transaction", I want to resolve this warning, but I don't have a good approach to revolve, I was thinking on effects but What happen when I am reusing the action in serveral parts of the project and I don't want to dispatch the other actions.

public initialize(users: Users) {
    this.store.dispatch(loadUsers(users));
    this.store.dispatch(loadMessage('Initialized'));
    this.store.dispatch(loadBanner());
    this.store.dispatch(loadFooter());
}
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can write your actions as events, which makes it easier.

public initialize(users: Users) {
    this.store.dispatch(iAmInitialized());
}

Multiple parts of your application can then listen to this action to do their thing, e.g. load users, load messages, load banner, and load footer.

https://ngrx.io/guide/eslint-plugin/rules/avoid-dispatching-multiple-actions-sequentially

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda