Estoy tratando de estirar mi componente <View> usando left y right
Sé cómo hacerlo en html y css:
.testing{ background-color: orange; position: absolute; left: 100px; right: 20px; } <div class="testing"> Hello there </div>pero, ¿cómo logro el mismo resultado en reaccionar nativo?
Editar
Intenté esto pero no funciona:
export default function App() { return ( <View style={styles.container}> <View style={{ left: 100,right: 20,height:50,position: 'absolute', backgroundColor: 'orange'}}><Text>hello there</Text></View> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });Probé tu código y me funciona. Intente reinstalar y pegar su código en un nuevo proyecto