JavaScript (2) 썸네일형 리스트형 [ReactNative] Location import React, { useState, useEffect } from 'react'; import { Platform, Text, View, StyleSheet } from 'react-native'; import * as Location from 'expo-location'; export default function App() { const [location, setLocation] = useState(null); const [errorMsg, setErrorMsg] = useState(null); useEffect(() => { (async () => { let { status } = await Location.requestForegroundPermissionsAsync(); if (stat.. React Native의 markup 1. View를 사용 - 로 마크업을 만든다. 2. style을 활용 - 웹과 유사하게 스타일을 만들 수 있다. - styleSheet를 제공하며 CamelCase를 따른다. - flexbox를 활용하는데 웹과 거의 유사하다. - 픽셀의 개념이 있지만 비율로 조정하는 것이 일반적이다. 3. 컴포넌트를 쓰자 - React Native 팀은 진짜 기본적인 컴포넌트들을 제공한다. - 더 필요하다면 오픈소스 뒤지거나, expo에서 찾도록 한다. import { StatusBar } from 'expo-status-bar'; import React from 'react'; import { StyleSheet, Dimensions, Text, View, ScrollView } from 'react-native'; .. 이전 1 다음