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

349
Views
Does React give us a call trace/tree?

The problem:

scheme

We have a hook that implements some DOM event logic and hook is used in some components. The hook is a red star.

That hook is used in parent and child components so its like "A* -> B*", where * is a hook.

When DOM event is triggered hook calls callbacks that is passed from components.

But it calls the both parent and child hooks. But we need to call only one callback not calling parent.

So I wonder, does React give us a call tree so we can know who parent is?

P.S. using a DOM tree probably can solve my problem but if we use portals its useless.

P.S.S. calling order is always random so we cannot use stopPropagation. We need to know is there any child that uses the same hook so we dont call parent's callback.

about 4 years ago · Santiago Gelvez
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!