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

78
Views
Redux middleware handling multiple actions

I am using middleware in redux for some async logic execution. My question is what happens when a action is being processed by the middleware and another action is dispatched before the completion of the first one, what will happen in this case, whether the action will be put to halt till the middleware complete processing or whether that action will pass the middleware which will start executing for this action as well (along with the first one).

I am a beginner to react and redux and don't know if the answer should be obvious as it is not to me.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

TLDR: It cannot happen because JS is a sync language. It operates using event loop and tasks queue. Each async task (i.e. receiving fetch response or event listener triggered by user) is placed in a queue and is executed one by one. So when some task is executed another will wait in queue.

Also keep in mind that async function is more then one task. Each await indicates a new task.

There are a lot of explanation of this model in the internet by keywords: "JS event loop" 1, 2

about 4 years ago · Juan Pablo Isaza 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!