1
양식을 제출하고 양식 값으로 감속기를 호출하려하지만 값을 가져올 수 없습니다. 내가 버튼을 클릭하고 login()
기능에 도착, 심지어 통과 할 수onPress 양식 제출 및 값 처리
login() {
if (this.props.valid) {
//do something here, but how to get the data?
} else {
Toast.show({
text: "Enter Valid Username & password!",
duration: 2500,
position: "top",
textStyle: { textAlign: "center" }
});
}
}
: 같은 로그인 기능이 모습입니다 여기
<Field
name="email"
component={this.renderInput}
type="email"
validate={[email, required]}
/>
<Field
name="password"
component={this.renderInput}
type="password"
validate={[alphaNumeric, minLength8, maxLength15, required]}
/>
<Button
rounded
primary
block
large
style={styles.loginBtn}
onPress={() => this.login()}
>
과 :
여기처럼 내 양식이 어떻게 표시되는지를 보여줍니다 if (this.props.valid
) 확인하지만 로그인 기능에서 이메일 및 비밀번호 값을 가져 오는 방법을 알 수 없습니다.