Skip to content

Objects are not valid as a react Child error #8

@davvit

Description

@davvit

Im facing the following issue on Text component. The error is Objects are not valid as React Child....
and its because of how the children prop is rendered in that controller. Its seems fine to me but not sure why its throwing error. Hoping someone can find the issue here.

Text.js

  <Text {...textID} {...rest} style={textStyles}>
      {children}  
    </Text>

I have tried {props.children} here but same result. {JSON.stringify(props.children)} renders the strings with quotes around them so i know the text is coming through.

On the second image(using {JSON.stringify(props.children)} ) , You can see the brand text is actually an object hence the error. Is the brand name usage of the control wrong or is there some other issue here?

Screenshot_20211223-003910_Expo Go

Screenshot_20211223-004816_Expo Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions