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

246
Views
La iteración de objetos en el procesamiento del componente de reacción no funciona

En primer lugar, me gustaría informarles que soy muy nuevo en el desarrollo de reacciones. Cuando traté de renderizar una pestaña con iteración, obtuve el siguiente error. ¿Puede alguien amablemente ayudarme a identificar por qué esto no funciona? ¿Hay un error en la sintaxis?
#Implementación

 Line 76: Expected to return a value in function array-callback-return Line 77: Expected an assignment or function call and instead saw an expression no-unused-expressions
 render() { const { classes,orderTabDataCollections } = this.props; const { value } = this.state; return ( <div className={classes.root}> <AppBar position="static" color="default"> <Tabs value={value} onChange={this.handleChange} indicatorColor="primary" textColor="primary" variant="scrollable" scrollButtons="auto" > {Object.keys(orderTabDataCollections).map(keyz => <Tab key={keyz} label={keyz.toUpperCase()} /> )} </Tabs> </AppBar> { Object.keys(this.props.orderTabDataCollections).map(function(keyz, index) { value === index && <TabContainer key={keyz} > <TweakDataForm key={keyz} tweakDataCollection={orderTabDataCollections[keyz]}/></TabContainer> })} </div> ); }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

 .... { Object.keys(this.props.orderTabDataCollections).map(function(keyz, index) { if(value === index){ return <TabContainer key={keyz} > <TweakDataForm key={keyz} tweakDataCollection= {orderTabDataCollections[keyz]}/> </TabContainer> } return null; })}

map debe devolver algún valor de su devolución de llamada si se pasa la función de devolución de llamada. Actualizar el código para envolver el map TabContainer como se muestra arriba debería corregir Line 76: Expected to return a value in function .

mapa

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!