**Adding Text to React Native App**
As I started working on my React Native app, I realized that adding text was not as straightforward as I thought it would be. I was trying to add a text element to the app, but nothing seemed to work. I tried using `position absolute` for the buttons and added the text, but I didn't know if I was doing something wrong. So, I decided to wrap all of this in a `View` and set the top margin to auto to push everything down over the wave.
However, it turned out that my app had a `WaveContainer` component with an image and buttons, and I wasn't sure how to add text underneath it without messing up the layout. So, I decided to experiment and try different things. I wrapped all of this in a new `View`, but I didn't know if it was already inside the `WaveContainer`. After some trial and error, I realized that adding a text element directly on top of the image wasn't working.
To fix this issue, I decided to use the `styles` property and add a link to the code in our chat. But, as expected, React Native can be more annoying than straight-up React. It has many features and options, but sometimes it's hard to figure out how to use them. I tried using `styles.dot` and added some styles, but nothing seemed to work.
After much frustration, I finally realized that the issue was with the `z-index` property. I set it to 1 and added a `text style`, but still, the text wasn't appearing underneath the image. So, I decided to try removing the text from its current position and add it again, just in case. And, yes! It worked!
But, why is this so hard? Why can't we just use React and React Native together without all these extra steps and properties? I mean, `metro` wouldn't let me into my project, and I had to refresh the app multiple times to make it work. But, I guess that's just part of the learning process.
**Learning from My Mistakes**
As I continued working on my app, I realized that I need to be more careful when using React Native. It has many features and options, but sometimes they can be confusing. So, I decided to take a step back and think about what I was trying to do.
I remembered that in React, we use `position absolute` for buttons and other elements that need to be positioned outside of the normal flow. But, when it comes to text, we need to use a different approach. In this case, I used the `SafeAreaView` component to wrap my text element, which allowed me to add it underneath the image without messing up the layout.
But, even with this solution, I still had some issues. The text wasn't appearing on top of the image, and I couldn't figure out why. After much trial and error, I finally realized that it was due to the `z-index` property. By setting it to 1, I was able to add the text underneath the image.
**Conclusion**
Building a React Native app can be challenging, but it's also a great learning experience. We can learn so much from our mistakes and experiment with different solutions until we find what works best. In this case, I learned that using `SafeAreaView` and setting the `z-index` property can help us add text underneath images without messing up the layout.
I also realized that React Native is a powerful tool, but it has its own set of challenges. We need to be patient and willing to learn as we go. And, sometimes, we just have to experiment and try different things until we find what works best.
So, if you're new to React Native or struggling with text placement in your app, I hope this article was helpful. Remember that practice makes perfect, so don't be afraid to try new things and learn from your mistakes. Good luck!