0

I have created button component for my app.

Here is my code

 <TouchableOpacity 
 style={{ width: 200, height: 40, backgroundColor: '#000', justifyContent: 
 'center', alignSelf: 'center' }}>
  <Text style={{ color: '#ffffff', justifyContent: 'center', alignSelf: 
  'center'}}>
    Button
  </Text>
 </TouchableOpacity

enter image description here

i want to see second output not the first one

Sagar Kachhadiya
  • 1,025
  • 2
  • 9
  • 24

1 Answers1

3

i have seen your code and i m trying to find your answer. you can use the <Text> tag in your code and inside this tag you can place your component in <Text> tag with {``} this braces and back-ticks . you can place you code in the back-ticks and that will work. if you trouble in this answer feel free to ask again. Please try this if it helpful for you. thank you.

Nitin Sidhu
  • 161
  • 5