2주차 앱개발

말로우밀랭·2022년 6월 14일
0

앱배우기

목록 보기
2/2

sparta-myhoneytip-mir

App.js
일반 주석처리는 //를 치고 적으면 되지만
jsX태그 안에 주석을 쓸 때는
{/ 나는 주석 /}로 써야 하는데
이것을 잘 모르겠다 싶을 땐
내용을 드래그하고 ctrl + / 를 눌러주면 알아서 주석처리가 된다!

    <Button 
      style={styles.buttonStyle} 
      title="버튼입니다 "
      color="#f194ff" 

//요방식이나
onPress={function(){
Alert.alert('팝업 알람입니다!!')
}}

    <Button 
        style={styles.buttonStyle} 
        title="버튼입니다 "
        color="#FF0000" 

//요방식 많이씀
onPress={()=>{
Alert.alert('팝업 알람입니다!!')
}}

첫화면 구성하기
출발 코드 >>

import React from 'react';
import main from './assets/main.png';
import { StyleSheet, Text, View, Image, TouchableOpacity, ScrollView} from 'react-native';

export default function App() {
console.disableYellowBox = true;
//return 구문 밖에서는 슬래시 두개 방식으로 주석
return ()

}

const styles = StyleSheet.create({})

profile
배워가는 코딩 어린이

0개의 댓글