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

317
Views
Intento no válido de difundir una instancia no iterable al obtener cada valor del selector

Así que tengo un selector que está asignado en función de los elementos de la base de datos y estoy tratando de obtener el valor de cada selector para enviarlo de vuelta a la base de datos. Hasta ahora he hecho esto:

 this.state = { rating: null, arrRating:[] } renderQuestion(){ let panels = [] this.props.companyQuestion.map((key, index) => { panels.push( <View key={index} style={styles.panel}> <View style={styles.panelRow}> <Text style={styles.panelText}>{key.question}</Text> <Picker selectedValue={this.state.rating} style={styles.panelText} onValueChange={(itemValue, itemIndex) => this.setState({ rating: itemValue, arrRating:[...this.state.arrRating.push(this.state.rating)] }) }> <Picker.Item label="Score" value="0" /> <Picker.Item label="1" value="1" /> <Picker.Item label="2" value="2" /> <Picker.Item label="3" value="3" /> <Picker.Item label="4" value="4" /> <Picker.Item label="5" value="5" /> </Picker> </View> </View> ); }) return panels; }

Pero tengo un error cuando elegí un artículo en el selector. Dice

 TypeError: Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
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!