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

207
Views
React-router push callback?

I need to trigger a synchronous action after react-router push, which appears to be async

Is it possible to do something like:

dispatch(push('/', callbackFunction))

I don't see anything in the react-router docs about a callback to push, which seems quite odd...

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As it seems, push is not asynchronous since it is just an action creator (factory pattern).

So you could trigger you actions like this:

dispatch(push('/'));
dispatch(otherAction());

Relevant lines

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!