Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
Align Item Right within container

This is probably a simple answer but I am still learning js / react native and am a bit at a loss.

Could someone explain why the following code fails to right align the "handicap" element?

import React from 'react';
import {View, StyleSheet } from 'react-native'
import AppText from './AppText';

function ListItem({ name, uid, handicap }) {
    return (
        <View style={styles.container}>
            <AppText>{uid}. </AppText>
            <AppText>{name}</AppText>
            <AppText style={{justifyContent: "flex-end"}}>{handicap}</AppText>
        </View>
    );
}

const styles = StyleSheet.create({
    container: {
        flexDirection: "row",
        padding: 10
    },
})

export default ListItem;

I want something like:

  1. Name 5
  2. Name 6

But get

  1. Name5
  2. Name6

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try to add flex: 1 to container style

...
container: {
        flex: 1,
        flexDirection: "row",
        padding: 10
    },
 ...
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda