Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

React Native – Text must be rendered withing a <Text> component

I am m trying to write an app that just saves and holds data, and I am getting the following error.

Unexpected text node: . A text node cannot be a child of a < View >. (On Chrome DevTools)

Text must be rendered withing a component (On Expo Go simulations)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

From what I understand there is a " " (as in the space character) SOMEWHERE in the code and it wont work because of that, but I have completely no clue where the space can be, as prettier just puts spaces everywhere on its own to style stuff.

It runs fine in the web, but I need it to work on iOS, and when I try to simulate it, this error stops the entire app.

Here is a link to snack.expo with a stripped down version of what im trying to make: https://snack.expo.dev/@vevlex/stringintext

(Right now there is an error because the ID of the added jobs is the same, I’m aware of that and I just didn’t get around to doing that yet)

>Solution :

Remove {""} in App.js. We need to use {/**/} for comments.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading