전체 글27 map 함수로 반복문 돌리기 json 파일은 데이터를 딕셔너리처럼 넣는 곳이라 보면 됨. export default function App() { let tip = data.tip; return ( { tip.map((content,i)=>{ return ( {content.title} {content.desc} {content.date} ) }) } ); } 2023. 1. 7. 메인 화면 n1 네모 안에 글씨 보이게 marginTop 하여서~ 더보기 import React from 'react'; import { StyleSheet, Text, View, Image, TouchableOpacity, ScrollView} from 'react-native'; const main = 'https://firebasestorage.googleapis.com/v0/b/sparta-image.appspot.com/o/lecture%2Fmain.png?alt=media&token=8e5eb78d-19ee-4359-9209-347d125b322c' const pizza = "https://firebasestorage.googleapis.com/v0/b/sparta-image.appspot.com/o/lect.. 2023. 1. 7. 센터에 위치하게 만들기 contain : { flex:4, backgroundColor:"orange", alignItems:"center", justifyContent : "center" }, Align Items는 Flex Direction과 수직한 방향(반대 방향이라고 생각하면 편합니다)으로 정렬하는 속성입니다. flexDirection: 'column'에서 alignItems는 좌우 정렬, flexDirection: 'row'에서 alignItems는 상하 정렬을 뜻합니다 flex-start, center, flex-end, stretch 속성을 가집니다. 아래 설명 이미지를 보고 한번 적용해볼까요? 2023. 1. 7. 이미지 파일 불러오기 import .. from * 내부 이미지 파일 불러오기 ./ 는 나와 동일한 선상에 있는 파일을 불러오는 것. ./ ⇒ 현재 파일과 동일한 위치에서 불러올 파일을 찾는 코드 ../ ⇒ 현재 파일이 위치한 폴더보다 상위 위치에서 불러올 파일을 찾는 코드 * 외부 이미지 파일 불러오기 2가지 방법 1. const .. = ' 주소 ' 하고 return 문 안에서 2023. 1. 7. 이전 1 2 3 4 5 6 7 다음