티스토리 뷰

모각코

2019년 7월 10일 모각코 결과

AI의 호흡 2019. 7. 10. 21:00

팀원 주소

오지원 : https://mgk-jiwon.postype.com/post/4162859

 

2019.07.10 모각코 3회차 모임 (NullPointerException)

목표 : react 와 native react에 대해서 공부하기

mgk-jiwon.postype.com

강서연 : https://blog.naver.com/rose_7297/221582383728

 

2019.07.10 모각코 3회차_목표

이러닝에서 크롤링해와서 과제정보와 강의정보 가져옴DB 공부해서 이 정보를 넣을 계획임.

blog.naver.com

로그인 화면을 만들었다.

우선 expo로 프로젝트를 만들고 react native를 사용해서 앱을 만들었다.

 

import React, { Component } from 'react';

import { Alert, Button, TextInput, View, StyleSheet } from 'react-native';

 

export default class App extends Component {

constructor(props) {

super(props);

 

this.state = {

username: '',

password: '',

};

}

 

onLogin() {

const { username, password } = this.state;

 

Alert.alert('Login Success!');

}

 

render() {

return (

<View style={styles.container}>

<TextInput

value={this.state.username}

onChangeText={(username) => this.setState({ username })}

placeholder={'Username'}

style={styles.input}

/>

<TextInput

value={this.state.password}

onChangeText={(password) => this.setState({ password })}

placeholder={'Password'}

secureTextEntry={true}

style={styles.input}

/>

 

<Button

title={'Login'}

style={styles.input}

onPress={this.onLogin.bind(this)}

/>

</View>

);

}

}

 

const styles = StyleSheet.create({

container: {

flex: 1,

alignItems: 'center',

justifyContent: 'center',

backgroundColor: '#ecf0f1',

},

input: {

width: 200,

height: 44,

padding: 10,

borderWidth: 1,

borderColor: 'black',

marginBottom: 10,

},

});

 

'모각코' 카테고리의 다른 글

2019년 7월 17일 모각코  (0) 2019.07.24
2019년 7월 24일 모각코  (0) 2019.07.24
2019년 7월 10일 모각코  (0) 2019.07.10
2019년 7월 3일 모각코 결과  (0) 2019.07.03
2019년 7월 3일 모각코  (0) 2019.07.03
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2026/03   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함