Fun Planet
Fun Planet

Reputation: 73

"Text must be rendered within <Text>" error

I am creating an application in React Native (Expo) using Snack. This program was working an hour ago, but now it shows this error.

Device: Text strings must be rendered within a <Text> component.

Snack Link

I know why this error occurs, but I don't know where exactly the error is.

Things Tried: Checked for

Upvotes: 0

Views: 54

Answers (1)

Eshant Bist
Eshant Bist

Reputation: 1635

In your ButtonGroup.js

 <Button
      onPress={() => {
        this.props.navigation.navigate('Project_Submit');
      }}
      icon="publish"
      type="entypo"
      name="Submit Project"
    />{' '}

Replace with


<Button
      onPress={() => {
        this.props.navigation.navigate('Project_Submit');
      }}
      icon="publish"
      type="entypo"
      name="Submit Project"
    />

Line 31 is a text

Upvotes: 2

Related Questions