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

266
Views
No se pudieron devolver datos después de findByCreate por setDoc (React JS + Firebase)

Estoy implementando findOrCreate para devolver datos creados por setDoc() en Firestore + React JS. Pero devuelve undefined .

Promesa[[Prototipo]]: Promesa[[PromiseState]]: "cumplido"[[PromiseResult]]: indefinido

 ... async findOrCreate(name: string, email: string, profileURL: string, userId: string) { const doc = await getDoc(this.doc(userId)) const data = doc.data() if (data !== undefined) return const newData = await setDoc(this.doc(userId), { name, email, profileURL }).then((data) => { console.log('data', data) return data }) console.log('newData', newData) } ...
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La función setDoc() solo devuelve Promise<void> y no datos de documentos. Puede simplemente console.log(data) ya que esos son los datos que está configurando en el documento.

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!