forked from faishalfirmanh/postReact
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetuser.js
More file actions
65 lines (61 loc) · 1.28 KB
/
Copy pathGetuser.js
File metadata and controls
65 lines (61 loc) · 1.28 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* @flow */
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TextInput,
} from 'react-native';
function func2(){
console.log(this);
}
// x ={
// func = function(){
// console.log(this);
// }
// }
// x.func()
// func2()
export default class Getuser extends Component {
constructor(props) {
super(props);
this.state = {
value:"edit text"
};
this.handleChangeText = this.handleChangeText.bind(this)
}
handleChangeText(newText){
this.setState({
value:newText
})
}
render() {
return (
<View style={styles.container}>
<Text>
masukkan username
</Text>
<TextInput style={{backgroundColor:'rgb(99,255,196)',fontSize:20}}
defaultValue = {this.state.value}
onChangeText={this.handleChangeText}
/>
<Text>edit tek{this.state.value}</Text>
<Text>
masukkan password
</Text>
<TextInput style={{backgroundColor:'rgb(99,255,196)',fontSize:20}}
defaultValue = {this.state.value}
onChangeText={this.handleChangeText}
/>
<Text>{this.state.value}</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent:'center',
padding:25
},
});