निराकरण: तळाच्या मध्यभागी मूळ घटकावर प्रतिक्रिया द्या

मुख्य समस्या अशी आहे की तळाच्या मध्यभागी प्रतिक्रिया मूळ घटक सहज प्रवेशयोग्य नाही.

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 मध्ये योग म्हणजे काय

React नेटिव्ह हे React सह मोबाईल अॅप्स तयार करण्यासाठी एक व्यासपीठ आहे. योग ही एक प्रोग्रामिंग भाषा आहे जी विकसकांना वापरकर्ता इंटरफेस आणि अनुप्रयोग तयार करण्यात मदत करते.

फ्लेक्सबॉक्स म्हणजे काय

?

Flexbox हे React Native साठी लेआउट मॉड्यूल आहे जे लवचिक आणि प्रतिसादात्मक लेआउट तयार करणे सोपे करते. हे तुम्हाला कोणते घटक ताणले जावे आणि कोणते संकुचित केले जावे हे निर्दिष्ट करण्यास अनुमती देते आणि लेआउट कसे प्रस्तुत केले जाते हे नियंत्रित करण्यासाठी विविध पर्याय प्रदान करते.

संबंधित पोस्ट:

एक टिप्पणी द्या