Skip to content

Sometimes when <Feed /> or <Search /> is mounted, the app crashes because of a <Text> related error #12

@0xJoelero

Description

@0xJoelero
Error: Text strings must be rendered within a <Text> component.

This error is located at:
    in RCTView (at View.js:32)
    in View (created by Publication)
    in RCTView (at View.js:32)
    in View (created by Publication)
    in RCTView (at View.js:32)
    in View (created by Publication)
    in Publication (created by CellRenderer)
    in RCTView (at View.js:32)
    ...

Screenshot 2023-03-09 at 00 10 23

My code:

const LensHome = () => {
  const navigation = useNavigation();
  return (
    <SafeAreaView style={styles.container}>
      <Search
        placeholder={i18next.t('search')}
        searchType={SearchType.publication}
        onProfileImagePress={profile => {
          navigation.navigate('LensProfile', { profile });
        }}
        onLikePress={() => {}}
        onCommentPress={publication => {
          const publicationId = publication?.mirrorOf
            ? publication?.mirrorOf?.id
            : publication?.id;
          navigation.push('LensComments', {
            publicationId,
          });
        }}
      />
    </SafeAreaView>
  );
};
export default LensHome;

The weird thing is this error is random, sometimes it happens, sometimes it doesn't, but when it always happens after the spinner (loading indicator) 'completes' the loading.

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