Çözüldü: yerel bileşene alt merkezde tepki verin

Asıl sorun, alt merkezdeki tepki yerel bileşenine kolayca erişilememesidir.

I'm trying to create a component at the bottom center of the screen in React Native. I've tried using <code>absolute</code> and <code>relative</code> positioning, but nothing seems to work. Here's my code:
<code>&lt;View style={{position: 'absolute', bottom: 0, alignItems: 'center'}}&gt;
  &lt;Text&gt;This is my component!&lt;/Text&gt;
&lt;/View&gt;
</code>


A:

You can use <code>flexDirection:'row'</code>,<code>justifyContent:'center'</code>,<code>alignItems:'flex-end'</code>. 

<View style={{flexDirection:'row',justifyContent:'center',alignItems:'flex-end'}}>
<Text>This is my component!</Text>
</View>

React Native'de Yoga Nedir?

React Native, React ile mobil uygulamalar oluşturmaya yönelik bir platformdur. Yoga, geliştiricilerin kullanıcı arabirimleri ve uygulamaları oluşturmasına yardımcı olan bir programlama dilidir.

Flexbox nedir?

?

Flexbox, esnek ve duyarlı düzenler oluşturmayı kolaylaştıran, React Native için bir düzen modülüdür. Hangi bileşenlerin genişletilmesi ve hangilerinin sıkıştırılması gerektiğini belirtmenize izin verir ve mizanpajın nasıl oluşturulacağını kontrol etmek için çeşitli seçenekler sunar.

İlgili Mesajlar:

Leave a Comment