title: Can't find variable setUserEmail
body: <p>I'm linking my backend with my frontend in react native and I get this error <code>Can't find-variable: setUserEmail</code> when I go to type in an email into the <code>TextInput</code>. I'm working on the login page and use a fetch API to log the user into the app. I followed a tutorial to the point but I'm getting this error each time I try to enter an email, I get a message say <code>setUserEmail</code> is declared but never used. Any help would be greately appreciated</p>
  <pre><code>import React, { Component, useState, createRef } from 'react';
  import { StyleSheet, Text, TextInput, View, Dimensions, StatusBar, TouchableOpacity,Keyboard } from 'react-native';
  
  export default function Login(){         
      const [userEmail, setUserEmail] = useState('');
      const [userPassword, setUserPassword] = useState('');
      const [loading, setLoading] = useState(false);
  
      const handleSubmitPress = () =&gt; {
          setLoading(true);
          let dataToSend = {userEmail: userEmail, password: userPassword};
          let formBody = [];
          for (let key in dataToSend) {
              let encodedKey = encodeURIComponent(key);
              let encodedValue = encodeURIComponent(dataToSend[key]);
              formBody.push(encodedKey + '=' + encodedValue);
          }
          formBody = formBody.join('&amp;');
  
          fetch('http://localhost:3000/users/users', {
              method: &quot;POST&quot;,
              headers: {
              Accept: &quot;application/json&quot;,
              &quot;Content-Type&quot;: &quot;application/json&quot;,            
              &quot;Cache-Control&quot;: &quot;no-cache&quot;,
              Pragma: &quot;no-cache&quot;,
              Expires: &quot;0&quot;,
          },
              body: JSON.stringify({
              userEmail: userEmail,                 
              password: userPassword,                
              os: Platform.OS === &quot;ios&quot; ? &quot;iOS&quot; : &quot;Android&quot;,
              }),
          })
          .then((response) =&gt; response.json())
          .then((responseJson) =&gt; {
          //Hide Loader
          setLoading(false);
          console.log(responseJson);
          // If server response message same as Data Matched
          if (responseJson.status === 'success') {
              AsyncStorage.setItem('user_id', responseJson.data.email);
              console.log(responseJson.data.email);
              navigation.replace('DrawerNavigationRoutes');
          } else {
              setErrortext(responseJson.msg);
              console.log('Please check your email id or password');
              }
          })
          .catch((error) =&gt; {
          //Hide Loader
          setLoading(false);
          console.error(error);
          });
      }
  
      return(
          &lt;View style={style.container}&gt;
  
              &lt;View style={style.parent}&gt;
                  &lt;Text style={style.title}&gt;Login&lt;/Text&gt;
                  &lt;Text style={style.heading}&gt;Please Sign in to continue&lt;/Text&gt;
              &lt;/View&gt;
  
              &lt;View style={style.root}&gt;
                  &lt;TextInput name='txtEmail' placeholder='someone@something.com' style={style.email} onChangeText={(UserEmail) =&gt; setUserEmail(UserEmail)}/&gt;
                  &lt;TextInput type='password' name='txtPassword' placeholder='Password' secureTextEntry={true} style={style.password} onChangeText={(UserPassword) =&gt; setUserPassword(UserPassword)}/&gt;                                                    
                  &lt;Text style={style.forgotpassword}&gt;Forgot Password?&lt;/Text&gt;
  
                  &lt;TouchableOpacity 
                      title=&quot;Login&quot;
                      style={style.login}
                      onPress={handleSubmitPress()}&gt;
  
                      &lt;Text style={style.login_caption}&gt;Login &lt;/Text&gt;
                  &lt;/TouchableOpacity&gt;     
  
              &lt;/View&gt;
  
                  
              &lt;StatusBar hidden /&gt;
          &lt;/View&gt;
      );
      
  }
  
  const style =  StyleSheet.create({
      container:{
          width: Dimensions.get('window').width,
          height: Dimensions.get('window').height,          
      },
      forgotpassword:{
          textAlign: 'right',
          marginTop: 10,
      },
      login:{
          width: 150,
          height: 45,
          backgroundColor: '#FFB900',     
          position: 'absolute',
          right: 0,  
          marginLeft: 25,
          marginRight: 15,         
          marginTop: 150,
          borderRadius: 25,        
      },
      login_caption:{
          color: '#fff',
          textAlign: 'left',
          paddingLeft: 15,
          justifyContent: 'center',        
          paddingTop: 12,        
      },
      parent:{
          marginTop: 85,
      },
      title:{
          fontSize: 36,
          fontWeight: &quot;900&quot;,
          paddingLeft: 25,
      },
      heading:{
          color: '#C0C0C0',
          paddingLeft: 25,
      },
      root:{
          width: 250,
          height: 350,                     
          marginTop: 85,
          alignSelf: 'center',
      },
      email:{        
          width: 275,
          height:38,
          borderColor: &quot;#111&quot;,
          borderWidth: 1,
          fontSize: 16,
          paddingLeft:10,
          justifyContent: 'center',
          borderRadius: 15, 
          alignSelf: 'center',
      },
      password:{
          width: 275,
          height:38,
          borderColor: &quot;#111&quot;,
          alignSelf: 'center',
          borderWidth: 1,
          fontSize: 16,
          paddingLeft:10,
          justifyContent: 'center',   
          marginTop: 15,
          borderRadius: 15,    
      }
  });
  </code></pre>
  <p><code>UPDATED WITH CHANGES</code></p>