Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
When debugging an Angular application that uses ngrx how can I find the line of code that dispatched a given action?

Currently I am working with a project that is getting pretty complicated. It uses Angular and ngrx to manage state change. A common problem I have is working with a particular effect or piece of state and needed to know where the related action was dispatched. Sometimes this is straight forward as there is only 1 line of code that dispatches the action and sometimes this is complicated as there are several. It is also difficult to understand what happens as a consequence of actions as it could cause components to change and effects to trigger (which dispatch more actions).

I am aware of Redux Devtools but this isn't sufficient as it only tells us the order of actions and the state changes. Breakpoints aren't sufficient as a breakpoint in the effects, reducer, or component does not have a stack trace that includes where the action was dispatched.

What you recommend? Any help is appreciated!

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

We encourage that the action has a source and the event as type, [Source] Event, e.g. [Customers Page] Loaded. This is what we call good action hygiene, because it's clear where the action is dispatched. For more info see the Good Action Hygiene Rule from the NgRx ESLint plugin.

over 4 years ago · Santiago Trujillo Report

0

I found Redux DevTools very comfortable, which is incorporated in chrome. Thanks to it you can reconstruct all the steps that are made between actions and effects.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!