React Native & Expo errors · Error 08 of 12

“Text strings must be rendered within a <Text> component”

By Muhammad Abdullah, full-stack, mobile and ai automation developer · Last reviewed

Text strings must be rendered within a <Text> component

Short answer

React Native only renders text inside <Text>. You have a bare string — often a stray character, or 0 from a condition like {count && <View />} — directly inside a <View>.

Common causes

  • Text or a space placed directly inside <View>.
  • A falsy number such as 0 rendered by {value && <Component />}.
  • A semicolon or character left in JSX after editing.

How to fix it

  1. Wrap visible text in <Text>.

  2. Make conditions return a boolean:

                          {count > 0 && <Badge count={count} />}
    {items.length ? <List /> : null}
                        

Let’s talk about the next step

Have an idea, a stuck app, or a workflow toimprove?

Tell me what you are building, what is blocking you, and what a successful outcome looks like.