title: How to fix 'readable native map to string '
body: <p>What I was trying to do is save the value of email and password. But, every time I run this project I am facing this error. I am getting error <code>READABLENATIVEMAP TO STRING</code>. The details of the error are available on the screenshot link is attached below.</p>
  
  <p><a href="https://i.stack.imgur.com/uph56.png" rel="nofollow noreferrer"> IMAGE OF ERROR AND LOGS</a>   </p>
  
  <pre><code>import React, { Component } from 'react';
  import { View, Text, TouchableOpacity, TextInput, StyleSheet, Button, Alert } from 'react-native';
  
      export default class Login extends Component {
  
          constructor(props) {
              super(props);
  
              this.state = {
                  loggedIn: true,
                  isLoading: true,
                  email: " ",
                  password: " ",
              }
          }
          submitForm = () =&gt; {
              if (this.state.email == "" || this.state.password == "") {
                  Alert.alert("PLEASE FILL EMAIL AND PASSWORD")
  
                  if (this.state.email != "" || this.state.password != "") {
                      this.loginData();
                  }
              }
          }
          loginData() {
              return fetch('http://192.168.1.150:8080/crm/api/api.php', {
                  method: 'POST',
                  headers: {
                      Accept: 'application/json',
                      'Content-Type': 'application/json',
                  },
                  body: JSON.stringify({
                      email: this.state.email,
                      password: this.state.password,
                  }),
              })
                  .then((response) =&gt; response.json())
                  .then((responseJson) =&gt; {
                      // return responseJson.data;
                      if (responseJson === 'Data Matched') {
                          // this.props.navigation.navigate('Second', { Email: UserEmail });
                          this.props.onHomeviewPress(this.state.data);
                      }
                      else {
                          Alert.alert(responseJson);
                      }
                  })
                  .catch((error) =&gt; {
                      console.error(error);
                  });
          }
  
          // handlePress = () =&gt; {
          //     this.props.onHomeviewPress(this.state.data);
          // }
  
  
          render() {
              return (
                  &lt;View style={styles.container}&gt;
                      &lt;Text style={{ color: "blue", fontSize: 28, marginLeft: 10 }}&gt; Login&lt;/Text&gt;
                      &lt;TextInput style={styles.input}
                          textContentType="emailAddress"
                          underlineColorAndroid="transparent"
                          placeholder="Email"
                          placeholderTextColor="blue"
                          textAlign="center"
                          onChangeText={(email) =&gt; this.setState({ email })}
                          autoCapitalize="none"
                      /&gt;
  
                      &lt;TextInput style={styles.input}
                          textContentType="password"
                          underlineColorAndroid="transparent"
                          placeholder="Password"
                          placeholderTextColor="blue"
                          textAlign="center"
                          onChangeText={(password) =&gt; this.setState({ password })}
                          autoCapitalize="none"
                      /&gt;
  
                      &lt;Button
                          onPress={this.loginData.bind(this)} title="Login"
                      /&gt;
                  &lt;/View&gt;
              );
          }
      }
  
  
  const styles = StyleSheet.create({
      container: {
          paddingTop: 23,
          marginTop: 150,
      },
      input: {
          margin: 15,
          height: 40,
          borderColor: 'blue',
          borderBottomWidth: 1,
          borderRadius: 5,
      },
  });
  </code></pre>
  
  <p>Please check the screenshot and my code to detect the error and help me to solve this.
  Thanks in advance!</p>