react-native 6

React-Native Fetch(API 연동)

안드로이드는 보통 데이터 베이스 연결할때 직접연결하기보다 API 이용해서 데이터값을 주고받는다 Second.js import React, {Component} from 'react'; import {StyleSheet,View, Text,TextInput, TouchableOpacity, Alert,Modal,TouchableHighlight} from 'react-native'; import { ScrollView } from 'react-native-gesture-handler'; class Second extends Component { state={ count:0, value:'', text:'', size:15, }; render() { return ( {/*justifyContent는 세로로가..

React-Native 2021.02.03

React-Native 화면전환 최종

1,2,3 다필요없음 이거만 보면됨 TEST다함 App.js // In App.js in a new project import * as React from 'react'; import { View, Text,Button } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; //각각의 외부 js파일을 import시켜주는거임 현재 같은폴더내 위치해서 ./파일명 으로 설정 import First from './First'; import Second from './Second'; import Hom..

React-Native 2021.01.29

React-Native CSS

import React from "react" const btnStyle = { color: "white", background: "teal", padding: ".375rem .75rem", border: "1px solid teal", borderRadius: ".25rem", fontSize: "1rem", lineHeight: 1.5, } function Button() { return Inline } Inline Style React 컴포넌트에 CSS 인라인스타일을 바로 적용하는것 중요특징 style 속성값에 일반 문자열이 아닌 자바스크립트 객체가 할당되야 합니다. CSS 속성명이 케밥 케이스(kebab case)이 아닌 카멜 케이스(camel case)로 작성되야 합니다. 존재하지 않는 키워드..

React-Native 2021.01.13

React-Native State

import React, {Component} from 'react'; import {View, Text, Button, StyleSheet, ScrollView} from 'react-native'; export default class App extends Component{ state = {data: "초기값"};//data의 초기값을 "초기값"으로 설정 render(){ const {data} = this.state; return( {data}//{변수}이런식으로 state값을 가져옴 ); }//render method .. // network 작업을 하는 메소드 fetchData=()=>{ var request = new XMLHttpRequest(); request.onreadystatecha..

React-Native 2021.01.12