# Text string error

**URL:** <https://forum.codewithmosh.com/t/text-string-error/2078>\
**Category:** React Native\
**Created:** [January 19, 2021, 1:20am UTC](https://forum.codewithmosh.com/t/text-string-error/2078 "2021-01-19T01:20:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![arinze\_n](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@arinze\_n](https://forum.codewithmosh.com/u/arinze_n)\
**Post date:** [January 19, 2021, 1:20am UTC](https://forum.codewithmosh.com/t/text-string-error/2078/1 "2021-01-19T01:20:06Z")

</div>

Hello guys, my code threw this error

“Invariant Violation: Text strings must be rendered within a component.”

still don’t get the reason why tho

---

<div class="post-metadata">

**Author:** ![Spark](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Spark](https://forum.codewithmosh.com/u/Spark)\
**Post date:** [January 19, 2021, 4:25am UTC](https://forum.codewithmosh.com/t/text-string-error/2078/2 "2021-01-19T04:25:23Z")

</div>

Post a screenshot of your code here.

---

<div class="post-metadata">

**Author:** ![arinze\_n](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@arinze\_n](https://forum.codewithmosh.com/u/arinze_n)\
**Post date:** [January 19, 2021, 5:11am UTC](https://forum.codewithmosh.com/t/text-string-error/2078/4 "2021-01-19T05:11:58Z")

</div>

Basically, the error only occurs while using the android emulator but on the web browser it’s working fine

 ![app error](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/2e678beaac32cb4ab67dc74358bd301143066bc5.jpeg)

---

<div class="post-metadata">

**Author:** ![Spark](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Spark](https://forum.codewithmosh.com/u/Spark)\
**Post date:** [January 19, 2021, 5:14am UTC](https://forum.codewithmosh.com/t/text-string-error/2078/5 "2021-01-19T05:14:26Z")

</div>

@arinze_n  
Thanks for posting the error but please post the code for the AppTextInput component.

The reason for the error not showing on the web is because the codes are parsed in different ways depending on the platform on which it is running. That is why react-native is a cross-platform framework

---

<div class="post-metadata">

**Author:** ![arinze\_n](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@arinze\_n](https://forum.codewithmosh.com/u/arinze_n)\
**Post date:** [January 19, 2021, 5:27am UTC](https://forum.codewithmosh.com/t/text-string-error/2078/6 "2021-01-19T05:27:36Z")

</div>

Here is the AppTextInput code

 ![Apptextinput](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/15d778bc69164e33a70daa795890542f6c837624.jpeg)

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 21, 2021, 9:20pm UTC](https://forum.codewithmosh.com/t/text-string-error/2078/7 "2021-01-21T21:20:01Z")

</div>

And how you call it in app.js ?
