Ive to manully type on the expo simulator app, how can i make it type via my laptop keyboard?


#1

Ive seen a lot of people typing with their keyboard, its very

time consuming to tick tick tick type the email via simulators’ keyboard.

How can i enable my mac keyboard ?

Yes i have this issue with react native cli too, so its a system issue i guess. Any help ?

  1. is there a way I pre-populate the email and password credentials so that i test it fast ?

handleFormSubmit({ email, password }) {
console.log(email,password);
// Need to do something to log user in
this.props.signinUser({ email,password });
},

render() {
const { handleSubmit, fields: {email, password }} = this.props;
return (



To-Do Signin–2-909090-9

      <View style={styles.field}>
        <TextInput
          {...email}
          placeholder="Email"
          style={styles.textInput}
          />
      </View>

      <View style={styles.field}>
        <TextInput
          {...password}
          placeholder="Password"
          style={styles.textInput}
          />
      </View>

      <View style={styles.buttonContainer}>
        <TouchableOpacity onPress={handleSubmit(this.handleFormSubmit)}>
          <Text style={styles.button}>
            Sign In
          </Text>
        </TouchableOpacity>
        <TouchableOpacity onPress={this.onSignUp}>
          <Text style={styles.button}>
            Sign Up
          </Text>
        </TouchableOpacity>
      </View>
    </View>
  );
}

});

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: ‘flex-start’,
alignItems: ‘stretch’,
paddingTop: 20,
backgroundColor: ‘#2ecc71
},
titleContainer: {
padding: 10
},
title: {
color: ‘white’,
fontSize: 35,
marginTop: 20,
marginBottom: 20
},
field: {
borderRadius: 5,
padding: 5,
paddingLeft: 8,
margin: 7,
marginTop: 0,
backgroundColor: ‘white’
},
textInput: {
height: 26
},
buttonContainer: {
padding: 20,
flexDirection: ‘row’,
justifyContent: ‘space-around’,
alignItems: ‘center’
},
button: {
fontSize: 30,
color: ‘white’
},
formError: {
color: ‘red’
}
});

var validate = (formProps) => {
var errors = {};

return errors;
}

export default reduxForm({
form: ‘signin’, //name of the form
fields: [‘email’, ‘password’]
}, null, actions) (Signin);

//


#2

To pre-populate the e-mail and password credentials you’re going to have to understand the difference between a controlled and uncontrolled input field in React. That information is available here https://facebook.github.io/react/docs/forms.html , look up input value.

Hope that helps!


#3

Resolved,

<View style={styles.field}>
        <TextInput
          {...email}
          placeholder="Email"
          value="someemail@gmail.com"
          style={styles.textInput}
          />
      </View>

      <View style={styles.field}>
        <TextInput
          {...password}
          placeholder="Password"
          style={styles.textInput}
          value="password"
          />
      </View>

#4

glad you figured this out!