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

200
Views
Inicialice una matriz vacía de objetos en reaccionar nativo

Quiero crear un objeto de matriz vacío en reaccionar nativo que quiero llenar con datos de una tabla sqlite. He buscado en Google pero solo obtengo respuestas como this.state={} o this.state = { newArr: [] } , pero quiero crear una matriz vacía de objetos similar a const [{ID:'', Name:'', Email:''}] .

¿Alguna idea de cómo puedo lograr esto?

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

0

Idealmente, newArr=[] funciona. Sin embargo, si desea que sea algo así [{ID:'', Nombre:'', Correo electrónico:''}]. También es posible. Permítanme compartir algunos ejemplos.

 const initialArr = [{ID:'', Name:'', Email:''}]; class YOURCOMPONENT extends React.Component{ constructor(props){ super(props); this.state = { newArr:initialArr, } }
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!