1 export default class Home extends Component {
2 constructor(props) {
3 super(props);
4
5 this.state = {
6 response: [],
7 user_namez: "",
8 user_pazz: "",
9 };
10 }
11
12 componentDidMount() {
13 axios.get('http://192.168.0.108/easy_backend/app/app_db/stud_data')
14 .then((response) => {
15 //as soon as the state is updated, component will render using updated values
16 this.setState({ response: response});
17 });
18 }
19
20 render() {
21 return (
22 <View>
23 {
24 this.state.response.map((y) => {
25 return (<Text>{y.prnt_usernamez}</Text>);
26 })
27 }
28 </View>
29 );
30 }
31 }