import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View, Button, Picker, AppState, DatePickerIOS, Alert} from 'react-native'; import { createAppContainer, createStackNavigator, StackActions, NavigationActions } from 'react-navigation'; import PushNotification from 'react-native-push-notification'; import DateTimePicker from 'react-native-modal-datetime-picker'; import PushController from './PushController.js'; export default class SettingsScreen extends React.Component { componentDidMount(){ console.log("HERE"); fetch('http://compsci02.snc.edu/cs460/2019/khoral/mysql/test.php', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ name: "test" }) }).then((response) => response.json()) .then((responseJson) => { //this.setState({data: responseJson}) console.log(responseJson); }).catch((error) => { console.error(error); }); } render() { return ( ); } } const styles = StyleSheet.create({ container: { borderRadius: 4, borderWidth: 0.5, }, title: { fontSize: 75, fontWeight: 'bold', }, activeTitle: { color: 'red', }, picker: { width:100, } });