Warning: Functions are not valid as a React child. (React-native )

Viewed 529

I am receiving the error: Warning: Functions are not valid as a React child.

I am writing a React Native application.

interface RegisterScreenProps {
  navigation: NavigationContainerRef;
}

const RegisterScreen: FunctionComponent<RegisterScreenProps> = ({
  navigation,
}: RegisterScreenProps) => {
  const { container, headerLogo, headerTitle, body } = styles;

  return (
    <SafeAreaView style={{ flex: 1 }}>
      <KeyboardAwareScrollView style={styles.container}>
        <View>
        <TextInput value={'afasfasdfdsfssddfsdfsffasf'} placeholder={'My Input'} />
        </View>
        
      </KeyboardAwareScrollView>
    </SafeAreaView>
  );
};

export default RegisterScreen;

I have tried many solutions but did not get success. When I remove KeyboardAwareScrollView this code works fine. i need KeyboardAwareScrollView for TextInput.

1 Answers
Related