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

156
Views
Conditional asignment with yield

I'm working in a react, redux, sagas project and in the saga file I have all the generators. Inside one generator I want to asign a variable like this:

const test = obj?.test || yield call("other generator")

But I can't do this because i got the following error:

"Parsing error: Can not use 'yield' as identifier inside a generator". 

I don't understand why. Can someone tell me why it's not working?

Thanks!

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

0

You have to do like this:

    const test = yield obj?.test || call("other generator")
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!