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

151
Views
Guarde una variable y utilícela en una etapa posterior en Ramda compose

Soy muy nuevo en Ramda y me he quedado atascado en un problema. Necesito obtener una respuesta de una API y pasarla a la siguiente función, pero esa misma respuesta debe usarse nuevamente en una etapa posterior en la misma redacción. ¿Cómo puedo guardar su valor en ese alcance de función ramda para que pueda reutilizarse nuevamente?

 const getData = (req, ctx) => R.compose ( R.andThen(... do some action using response from callSomeApi_2 and prop2) , callSomeApi_2(req, ctx) , R.andThen(R.map(R.prop('prop1'))) // response has prop1 and prop2 where prop2 is needed after getting response from callSomeApi_2 , callSomeApi_1(req, ctx) );

¿Cómo se puede lograr esto?

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

0

¿Ha intentado usar R.props() en lugar de R.prop() para que el código se convierta en algo así:

 const getData = (req, ctx) => R.compose ( R.andThen(... do some action using response from callSomeApi_2 and prop2) , callSomeApi_2(req, ctx) , R.andThen(R.map(R.props('prop1', 'prop2'))) // this will include both properties 1 & 2 , callSomeApi_1(req, ctx) );
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!