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

170
Views
FlexDirection nativo de React: 'fila' no funciona

Estoy tratando de enumerar estos nombres de elementos en una fila, colóquelos horizontalmente, pero no funciona. No puedo entender la razón por la cual. Realmente agradecería algo de ayuda

 const Text = () => { const Menu = [ {'id':1, 'menuName':'whatever', }, {'id':2, 'menuName':'whatever', }, {'id':3, 'menuName':'whatever...', }, ]; return ( <View style={styles.container}><Text >Test </Text> {Menu.map((menuItems) => ( <View style={styles.menuName} key={menuItems.id} > <Text>{menuItems.menuName}</Text> </View> ))} </View> ) } const styles = StyleSheet.create({ container :{ flex:1 }, menuName:{ flexDirection: 'row', height: 48, width: '100%', borderWidth: 1, padding: 10, } });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Razón para no trabajar.

Para organizar los elementos en una vista, debe configurar flexDirection = 'fila' en su caso, los elementos dentro de su Vista (Contenedor) deben organizarse horizontalmente para que la dirección flexible se aplique a la Vista (Contenedor)

Realice los siguientes cambios en el estilo, funcionará.

 container :{ flex:1, flexDirection: 'row', }, menuName:{ height: 48, width: '100%', borderWidth: 1, padding: 10, }

Para obtener más información sobre flex, siga este enlace.

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!