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

135
Views
withObservables with await

I'm storing some session details using AsyncStorage and trying to use one of those stored session details in the withObservables as a part of the query. For example, assume that getCurrentFruitID is an async helper method to retrieve the fruitID from AsyncStorage. The code I am attempting to write looks like this:

compose(
  withDatabase,
 from(() => )
  withObservables([], async ({database}) => ({
    fruit: database
        .get('fruits`)
        .query(Q.where('fruit_id', await getCurrentFruitID()),
  })),
)(Component)

but this results in an undefined is not an object error. I have taken a couple cracks at using the from function in RxJS (https://rxjs-dev.firebaseapp.com/api/index/function/from) as suggested by another person in the official forums but have had no luck. Any help would be much appreciated!

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